diff options
Diffstat (limited to 'blackboard2gradebook.tcl')
-rwxr-xr-x | blackboard2gradebook.tcl | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/blackboard2gradebook.tcl b/blackboard2gradebook.tcl index 5bce8e2..909c8dd 100755 --- a/blackboard2gradebook.tcl +++ b/blackboard2gradebook.tcl @@ -42,11 +42,6 @@ try { exit 1 } -# if DRYRUN is true the database will not be modified -set DRYRUN true -set DRYRUN [expr {!$params(w)}] - - ################# Config ############################################ #set categories2export [list FinalExam HomeWork LabReport] set categories2export [list FinalExam] @@ -57,6 +52,13 @@ set infoColumsMarkers {{ - Lateness \(H:M:S\)} { - Max Points} { - Submission Ti set skipCreationCol [concat $commonInfoCol $infoColumsMarkers] ###################################################################### +# if DRYRUN is true the database will not be modified +set DRYRUN true +set DRYRUN [expr {!$params(w)}] +if { $DRYRUN} { + puts "DRYRUN: DB will not be modified" +} + set classDB [lindex $argv 0] set blackboardDB [lindex $argv 1] @@ -150,7 +152,6 @@ proc trimColName { col } { return [list $shortCol $category $maxScore $type] } -set wasDRYRUNAnounced false proc dbRequest {script} { # verbose evaluation of dbRequest with dry run capability global DRYRUN @@ -160,11 +161,7 @@ proc dbRequest {script} { if {$line eq ""} {continue} append cmd $line\n if { [info complete $cmd] } { - if { [info exists DRYRUN] && $DRYRUN} { - if { ! $wasDRYRUNAnounced } { - set wasDRYRUNAnounced true - puts "DRYRUN: DB will not be modified" - } + if { ![info exists DRYRUN] || $DRYRUN} { #puts -nonewline "DRYRUN: $cmd" } else { puts -nonewline "Executing: $cmd" |