diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-05-11 23:01:15 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-05-11 23:01:15 -0400 |
commit | ea2e3b12941c8d580ad76ab1a82bf123a3c24189 (patch) | |
tree | 7c8e983e30a6ab692a166c41d1bb323c617fb74f /blackboard2gradebook.tcl | |
parent | 562e031f248da4401393ba2db1c8ffc7c5a7a013 (diff) | |
download | GradeBook-ea2e3b12941c8d580ad76ab1a82bf123a3c24189.tar.gz GradeBook-ea2e3b12941c8d580ad76ab1a82bf123a3c24189.zip |
check against old grades and excused ones
Diffstat (limited to 'blackboard2gradebook.tcl')
-rwxr-xr-x | blackboard2gradebook.tcl | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/blackboard2gradebook.tcl b/blackboard2gradebook.tcl index 3686645..c0a88c6 100755 --- a/blackboard2gradebook.tcl +++ b/blackboard2gradebook.tcl @@ -178,10 +178,10 @@ foreach col [getColListFromAnyTable bdb export_table] { set category [lindex $colInfo 1] set maxScore [lindex $colInfo 2] set scoreType [lindex $colInfo 3] - if { $category ne "FinalExam" } { - puts "skipping non FinalExam column: $col" - continue - } + #if { $category ne "FinalExam" } { + #puts "skipping non FinalExam column: $col" + #continue + #} if { ![doesColumnExists $shortCol GradesTable] } { veval [list AddColumnNonWeb $shortCol $category $maxScore] } @@ -193,6 +193,20 @@ foreach col [getColListFromAnyTable bdb export_table] { # change percentage to score set grade [ expr {$grade/100*$maxScore} ] } + set oldGrade [SelectColValue4User $shortCol $locUname ] + #puts "$locUname: oldGrade \{$oldGrade\} --> $grade" + if { $oldGrade == $grade } { continue } + if { [regexp -nocase -- {excuse} $oldGrade] } { + # remote system do not handle excuses + # so local system take precedence + puts "not updating \"excused\" grade" + continue + } + if { $oldGrade != $grade } { + puts "TESTING: skipping grades which change" + puts "$locUname: $shortCol oldGrade \{$oldGrade\} --> $grade" + continue + } veval [list UpdateColValue4UserNameNonWeb $shortCol $locUname $grade] } } |