aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-05-11 23:08:26 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-05-11 23:08:26 -0400
commitb11158a405d57a562b27ef46a436ed31a30400a9 (patch)
treef73bee137d9cc9bb6918a407a9bb03ab0f5b368f
parentea2e3b12941c8d580ad76ab1a82bf123a3c24189 (diff)
downloadGradeBook-b11158a405d57a562b27ef46a436ed31a30400a9.tar.gz
GradeBook-b11158a405d57a562b27ef46a436ed31a30400a9.zip
better handling of dryrun anounces
-rwxr-xr-xblackboard2gradebook.tcl10
1 files changed, 8 insertions, 2 deletions
diff --git a/blackboard2gradebook.tcl b/blackboard2gradebook.tcl
index c0a88c6..02dc901 100755
--- a/blackboard2gradebook.tcl
+++ b/blackboard2gradebook.tcl
@@ -113,16 +113,22 @@ proc trimColName { col } {
return [list $shortCol $category $maxScore $type]
}
+set wasDryRunAnounced false
proc veval {script} {
# verbose eval
global dryrun
+ global wasDryRunAnounced
set cmd ""
foreach line [split $script \n] {
if {$line eq ""} {continue}
append cmd $line\n
if { [info complete $cmd] } {
if { [info exists dryrun] && $dryrun} {
- puts -nonewline "DRYRUN: $cmd"
+ if { ! $wasDryRunAnounced } {
+ set wasDryRunAnounced true
+ puts "DRYRUN: DB will not be modified"
+ }
+ #puts -nonewline "DRYRUN: $cmd"
} else {
puts -nonewline "Executing: $cmd"
uplevel 1 $cmd
@@ -205,7 +211,7 @@ foreach col [getColListFromAnyTable bdb export_table] {
if { $oldGrade != $grade } {
puts "TESTING: skipping grades which change"
puts "$locUname: $shortCol oldGrade \{$oldGrade\} --> $grade"
- continue
+ #continue
}
veval [list UpdateColValue4UserNameNonWeb $shortCol $locUname $grade]
}