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.28 -r1.1.2.29 --- openacs-4/packages/xowf/lib/inclass-exam.wf 28 Apr 2020 19:47:20 -0000 1.1.2.28 +++ openacs-4/packages/xowf/lib/inclass-exam.wf 28 Apr 2020 22:37:42 -0000 1.1.2.29 @@ -448,6 +448,7 @@ set combined_form_info [::xowf::test_item::question_manager combined_question_form [self]] set autograde [dict get $combined_form_info autograde] set totalPoints [::xowf::test_item::question_manager total_minutes $combined_form_info] + set percentage_to_grade {50.0 60.0 70.0 80.0} ;# WI set ctx [::xowf::Context require [self]] set wf [xowf::test_item::answer_manager get_answer_wf [self]] @@ -505,6 +506,15 @@ # instance is in state "done". We set the __feedback_mode to # get the auto-correction included. # + foreach f [::xowiki::formfield::FormField info instances -closure] { + #ns_log notice "FF could DESTROY $f [$f name]" + if {[string match *_ [$f name]]} { + #ns_log notice "FF DESTROY $f [$f name]" + $f destroy + } + } + $wf form_field_flush_cache + set achieved_points {} xo::cc eval_as_user -user_id [$i creation_user] { $i set __feedback_mode 2 @@ -525,7 +535,7 @@ set signatureString "
#xowf.Grade# | # | " \ + "\n" + set nrGrades 0 + foreach v [dict values $grade_count] { incr nrGrades $v} + foreach k [lsort [dict keys $grade_count]] { + set count [dict get $grade_count $k] + set countPercentage [format %.2f [expr {$count*100.0/$nrGrades}]] + append gradingTable \ +|
---|---|---|
$k | $count | }] \ + [subst {
$gradingTable
+ } + set return_url [$package_id query_parameter local_return_url:localurl [:pretty_link]] append HTML "