aboutsummaryrefslogtreecommitdiff
path: root/GradeBook_lib.tcl
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-05-08 22:06:03 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2012-05-08 22:06:03 -0400
commite32bfd93d210c73c783ca1b9ae2d0cae091df90b (patch)
tree0d199e6534e33006ae4563e6a610ff159304c726 /GradeBook_lib.tcl
parent2992970653d9577e1cbfe5f0f938d3201f12a976 (diff)
downloadGradeBook-e32bfd93d210c73c783ca1b9ae2d0cae091df90b.tar.gz
GradeBook-e32bfd93d210c73c783ca1b9ae2d0cae091df90b.zip
added proper rounding for the final gradesv2.0.2
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-xGradeBook_lib.tcl2
1 files changed, 2 insertions, 0 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index 4a2e93f..340bed2 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -671,6 +671,8 @@ proc action2atributes { action_name } {
proc number2letter_grade { num } {
# grading_scheme MUST be sorted in descending order!
+ # here we do proper percent rounding
+ set num [expr {round(100.0*$num)/100.0}]
set grading_scheme [get_grading_scheme]
foreach {letter threshold} $grading_scheme {
if { $num >= $threshold } {