Index: openacs-4/packages/xowf/lib/inclass-exam.wf
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/Attic/inclass-exam.wf,v
diff -u -N -r1.1.2.22 -r1.1.2.23
--- openacs-4/packages/xowf/lib/inclass-exam.wf 20 Apr 2020 09:46:06 -0000 1.1.2.22
+++ openacs-4/packages/xowf/lib/inclass-exam.wf 22 Apr 2020 19:56:26 -0000 1.1.2.23
@@ -161,10 +161,17 @@
if {$proctoring} {
append text "
Exam with Proctoring.
"
}
- set nrQuestions [llength [dict get $combined_form_info title_infos]]
+ set question_objs [dict get $combined_form_info question_objs]
+ set nrQuestions [llength $question_objs]
+ set randomizationOk [dict get $combined_form_info randomization_for_exam]
+ set autograde [dict get $combined_form_info autograde]
+
append text [subst {
- $nrQuestions [expr {$nrQuestions == 1? "#xowf.question#" : "#xowf.questions#"}],
- [::xowf::test_item::question_manager total_minutes $combined_form_info] #xowf.Minutes#
+ $nrQuestions [expr {$nrQuestions == 1 ? "#xowf.question#" : "#xowf.questions#"}],
+ [::xowf::test_item::question_manager total_minutes $combined_form_info] #xowf.Minutes#,
+ [expr {$autograde ? "#xowf.exam_review_possible#" : "#xowf.exam_review_not_possible#"}],
+ [expr {$randomizationOk ? "#xowf.randomization_for_exam_ok#" : "#xowf.randomization_for_exam_not_ok#"}].
+
}]
set wf [xowf::test_item::answer_manager get_answer_wf $obj]
@@ -176,7 +183,7 @@
set pLink "."
} else {
#
- # Always compute the testrun and answer link.
+ # Always compute the test-run and answer link.
#
set wf_pretty_link [$wf pretty_link]
set tLink [export_vars -base $wf_pretty_link {
@@ -398,6 +405,8 @@
set HTML ""
set heading ""
set as_student [${:package_id} query_parameter as_student:boolean 0]
+ set combined_form_info [::xowf::test_item::question_manager combined_question_form [self]]
+ set autograde [dict get $combined_form_info autograde]
set ctx [::xowf::Context require [self]]
set wf [xowf::test_item::answer_manager get_answer_wf [self]]
@@ -407,7 +416,6 @@
set creation_user [$package_id query_parameter creation_user:integer ""]
set revision_id [$package_id query_parameter rid:integer ""]
-
set items [xowf::test_item::answer_manager get_wf_instances \
{*}[expr {$creation_user ne "" ? "-creation_user $creation_user" : ""}] \
{*}[expr {$filter_id ne "" ? "-item_id $filter_id" : ""}] \
@@ -460,10 +468,10 @@
xo::cc eval_as_user -user_id [$i creation_user] {
$i set __feedback_mode 2
set question_form [$i render_content]
- if {$withSignature || $as_student} {
+ if {$withSignature || $autograde} {
set answerAttributes [xowf::test_item::renaming_form_loader \
answer_attributes [$i instance_attributes]]
- if {$as_student} {
+ if {$autograde} {
set achieved_points [xowf::test_item::answer_manager achieved_points \
-answer_object $i -answer_attributes $answerAttributes]
}