Index: openacs-4/packages/xowf/lib/inclass-exam.wf =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/inclass-exam.wf,v diff -u -r1.1.2.78 -r1.1.2.79 --- openacs-4/packages/xowf/lib/inclass-exam.wf 16 Sep 2021 18:18:06 -0000 1.1.2.78 +++ openacs-4/packages/xowf/lib/inclass-exam.wf 2 Oct 2021 09:25:27 -0000 1.1.2.79 @@ -61,6 +61,8 @@ set :debug 0 set :live_updates 1 +Property realexam -default 1 -allow_query_parameter true + Action select -next_state created -label #xowf.online-exam-select# \ -title #xowf.online-exam-title-select# Action publish -next_state published -state_safe true -label #xowf.online-exam-publish# \ @@ -361,7 +363,7 @@ if {${:state} eq "done"} { set done_actions republish - set combined_form_info [::xowf::test_item::question_manager combined_question_form [self]] + set combined_form_info [::xowf::test_item::question_manager combined_question_form [self]] # # We could allow open_submission_review only when autograde is @@ -378,6 +380,15 @@ ${container}::done in_role swa [subst { -actions {$swa_done_actions} }] + + } elseif {${:state} eq "created" && [:property realexam]} { + # + # Check, if randomization is OK. If not, remove the "publish" + # button from the workflow. + # + set randomizationOk [dict get $combined_form_info randomization_for_exam] + ${container}::${:state} actions \ + [expr {$randomizationOk ? {publish restart} : {restart}}] } # Index: openacs-4/packages/xowf/tcl/test-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/test-item-procs.tcl,v diff -u -r1.7.2.162 -r1.7.2.163 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 17 Sep 2021 19:39:30 -0000 1.7.2.162 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 2 Oct 2021 09:25:27 -0000 1.7.2.163 @@ -5327,7 +5327,7 @@ {entry -name New.App.OnlineExam -form en:online-exam.wf -disabled true} {entry -name New.App.InclassQuiz -form en:inclass-quiz.wf -disabled true} - {entry -name New.App.InclassExam -form en:inclass-exam.wf} + {entry -name New.App.InclassExam -form en:inclass-exam.wf -query p.realexam=1} } }