aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2013-12-08 18:36:40 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2013-12-08 18:36:40 -0500
commita1519228f634d87938cac44391c3144b13013a55 (patch)
tree942f925c7ae6a057cf3fa770a9a4c0cc2b44a5b3
parent6480a208f52afd02cbfe18fed68b294273ac777a (diff)
downloadGradeBook-a1519228f634d87938cac44391c3144b13013a55.tar.gz
GradeBook-a1519228f634d87938cac44391c3144b13013a55.zip
instead of excused points calculate gained and maximum possible directly
-rwxr-xr-xGradeBook_lib.tcl6
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) } ]