Index: openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml,v diff -u -r1.2.2.36 -r1.2.2.37 --- openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 27 Sep 2020 16:54:52 -0000 1.2.2.36 +++ openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 13 Oct 2020 15:16:26 -0000 1.2.2.37 @@ -180,6 +180,7 @@ Randomisierung f�r Pr�fung geeignet Randomisierung f�r Pr�fung nicht geeignet (keine Zufallsauswahl "immer" verwenden) %achievedPoints% (gerundet %rounded%) von m�glichen %totalPoints% Punkten, %percentage%%, Note: %grade% + %achievedPoints% von m�glichen %totalPoints% Punkten, %percentage%%, Note: %grade% Name enth�lt zumindest ein ung�ltiges Zeichen Index: openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml,v diff -u -r1.2.2.35 -r1.2.2.36 --- openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 2 Oct 2020 11:25:08 -0000 1.2.2.35 +++ openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 13 Oct 2020 15:16:26 -0000 1.2.2.36 @@ -205,6 +205,6 @@ randomization for exam NOT ok ("always" should not be used) %achievedPoints% (rounded%rounded%) of possible %totalPoints% points, %percentage%%, grade: %grade% - + %achievedPoints% of possible %totalPoints% points, %percentage%%, grade: %grade% Name contains at least one invalid character 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.47 -r1.1.2.48 --- openacs-4/packages/xowf/lib/inclass-exam.wf 7 Oct 2020 14:46:21 -0000 1.1.2.47 +++ openacs-4/packages/xowf/lib/inclass-exam.wf 13 Oct 2020 15:16:26 -0000 1.1.2.48 @@ -512,7 +512,19 @@ set totalPoints [::xowf::test_item::question_manager total_minutes \ -max_items [:property max_items ""] \ $combined_form_info] + # + # The management of the grading scheme has to be extended. For the + # time being, we have a single grading scheme with the option to + # round to full points or not. When an exam has less than 40 + # points, we do not round, since this rounding could provide more + # than 1 percent of the result. This should be made configurable + # (also in www-print-answer-table, which is not used right now). + # set grading_scheme ::xowf::test_item::grading::wi1 + + if {$totalPoints < 40} { + append grading_scheme _noround + } set grade_dict {} set grade_csv "" 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.83 -r1.7.2.84 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 7 Oct 2020 14:46:21 -0000 1.7.2.83 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 13 Oct 2020 15:16:26 -0000 1.7.2.84 @@ -1057,7 +1057,7 @@ dict set nameToQuestionObjDict [:form_name_based_attribute_stem [$o name]] $o } return $nameToQuestionObjDict - } + } :public method answer_attributes {instance_attributes} { # @@ -2955,6 +2955,28 @@ } } } + + Grading create ::xowf::test_item::grading::wi1_noround -percentage_boundaries {50.0 60.0 70.0 80.0} { + + :public object method print {-achieved_points:required} { + if {[dict exists $achieved_points achievedPoints]} { + set totalPoints [format %.2f [dict get $achieved_points totalPoints]] + set achievedPoints [format %.2f [dict get $achieved_points achievedPoints]] + set percentage [format %.2f [expr {$totalPoints > 0 ? ($achievedPoints*100.0/$totalPoints) : 0}]] + set grade [:grade -achieved_points $achieved_points] + set panelHTML [_ xowf.panel_achievied_points_wi1_noround] + return [list panel $panelHTML csv [subst {$achievedPoints\t$percentage%\t$grade}]] + } + } + :public object method grade {-achieved_points:required} { + if {[dict exists $achieved_points achievedPoints]} { + set achieved [format %.2f [dict get $achieved_points achievedPoints]] + ns_log notice "XXXX $achieved_points -> [list calc_grade -points $achieved -achieved_points $achieved_points]" + return [:calc_grade -points $achieved -achieved_points $achieved_points] + } + } + } + } namespace eval ::xowiki {