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 -N -r1.7.2.53 -r1.7.2.54 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 26 Apr 2020 14:21:28 -0000 1.7.2.53 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 26 Apr 2020 20:14:20 -0000 1.7.2.54 @@ -1376,21 +1376,21 @@ # set all_form_fields [::xowiki::formfield::FormField info instances -closure] set totalPoints 0 - set totalPossiblePoints 0 + set achieveablePoints 0 foreach a [dict keys $answer_attributes] { set f [$answer_object lookup_form_field -name $a $all_form_fields] if {[$f exists correction_data]} { set cd [$f set correction_data] #ns_log notice "FOO: $a <$f> $cd" if {[dict exists $cd points]} { set totalPoints [expr {$totalPoints + [dict get $cd points]}] - set totalPossiblePoints [expr {$totalPossiblePoints + [$f set test_item_minutes]}] + set achieveablePoints [expr {$achieveablePoints + [$f set test_item_minutes]}] } else { ns_log notice "$a: no points in correction_data, ignoring in points calculation" } } } - return [list achievedPoints $totalPoints possiblePoints $totalPossiblePoints] + return [list achievedPoints $totalPoints achieveablePoints $achieveablePoints] } ######################################################################## @@ -1499,11 +1499,11 @@ } if {$achieved_points ne ""} { - set possiblePoints [format %.2f [dict get $achieved_points possiblePoints]] + set totalPoints [format %.2f [dict get $achieved_points totalPoints]] set achievedPoints [format %.2f [dict get $achieved_points achievedPoints]] - set percentage [format %.2f [expr {$possiblePoints > 0 ? ($achievedPoints*100.0/$possiblePoints) : 0}]] + set percentage [format %.2f [expr {$totalPoints > 0 ? ($achievedPoints*100.0/$totalPoints) : 0}]] set achievedPointsInfo [subst { - #xowf.Achieved_points#: $achievedPoints von möglichen $possiblePoints Punkten, + #xowf.Achieved_points#: $achievedPoints von möglichen $totalPoints Punkten, $percentage%
}] } else {