Index: openacs-4/packages/assessment/tcl/as-section-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-section-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/assessment/tcl/as-section-procs.tcl 18 Jan 2005 12:42:37 -0000 1.12 +++ openacs-4/packages/assessment/tcl/as-section-procs.tcl 18 Jan 2005 15:04:21 -0000 1.13 @@ -288,6 +288,14 @@ } db_1row sum_of_item_points {} + if ![exists_and_not_null section_max_points] { + set section_max_points 0 + } + + if {![exists_and_not_null item_max_points]||$item_max_points==0} { + set item_max_points 1 + } + set section_points [expr round($section_max_points * $item_points / $item_max_points)] db_dml update_section_points {} }