diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-12-08 18:36:40 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-12-08 18:36:40 -0500 |
commit | a1519228f634d87938cac44391c3144b13013a55 (patch) | |
tree | 942f925c7ae6a057cf3fa770a9a4c0cc2b44a5b3 /GradeBook_lib.tcl | |
parent | 6480a208f52afd02cbfe18fed68b294273ac777a (diff) | |
download | GradeBook-a1519228f634d87938cac44391c3144b13013a55.tar.gz GradeBook-a1519228f634d87938cac44391c3144b13013a55.zip |
instead of excused points calculate gained and maximum possible directly
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-x | GradeBook_lib.tcl | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index d2c4fc5..5b68c67 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -354,8 +354,7 @@ proc calculteWeightedTotals { } { foreach student $students_list { array set PointsSum [ calculteSumOfPointsForStudentInCategory $student $category ] set points_sum($category,$student) $PointsSum(gained_points) - set excused_points($category,$student) $PointsSum(excused_points) - set max_points($category,$student) [expr { $max_points($category) - $excused_points($category,$student)}] + set max_points($category,$student) $PointsSum(max_points) if { $max_points($category,$student) != 0 } { # normalizing set points_sum($category,$student) [expr { 1. * $points_sum($category,$student) / $max_points($category,$student) } ] @@ -387,8 +386,7 @@ proc calculteWeightedTotals { } { if { ![info exist points_sum($category,$student)] } { array set PointsSum [ calculteSumOfPointsForStudentInCategory $student $category ] set points_sum($category,$student) $PointsSum(gained_points) - set excused_points($category,$student) $PointsSum(excused_points) - set max_points($category,$student) [expr { $max_points($category) - $excused_points($category,$student)}] + set max_points($category,$student) $PointsSum(max_points) if { $max_points($category,$student) != 0 } { # normalizing set points_sum($category,$student) [expr { 1. * $points_sum($category,$student) / $max_points($category,$student) } ] |