diff options
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-x | GradeBook_lib.tcl | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index 270c7a1..9ff8e28 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -419,7 +419,15 @@ proc calculteSumOfPointsForStudentInCategory { student category } { set col_val 0 } } - if { !$isItExcuse } { + # some special category are just notes + # no need to do stats on them + set doNotNeedStats false + switch $category { + Note {set doNotNeedStats true; set col_val 0} + Info {set doNotNeedStats true; set col_val 0} + default { } + } + if { !($isItExcuse || $doNotNeedStats) } { lappend list_col_val $col_val lappend list_col_max $col_max_possible } @@ -506,6 +514,15 @@ proc calculteWeightedTotals { } { foreach student $students_list { set grand_total($student) 0 foreach {category weight} [getGradingWeights] { + # some special category are just notes + # no need to do stats on them + set doNotNeedStats false + switch $category { + Note {set doNotNeedStats true} + Info {set doNotNeedStats true} + default { } + } + if { $doNotNeedStats } { continue } if { ![info exist max_points($category)] } { set tmpList [ calculteMaxPointsInCategory $category ] set max_points($category) [lindex $tmpList 0] |