diff options
-rwxr-xr-x | importGrades2gradebook.tcl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/importGrades2gradebook.tcl b/importGrades2gradebook.tcl index 6720902..6a799a1 100755 --- a/importGrades2gradebook.tcl +++ b/importGrades2gradebook.tcl @@ -15,6 +15,7 @@ set options { {w "Write to database, disabled by default"} {v "Verbose"} {d "Debug write DB operations"} + {s "Add student, even if user info is incomplete"} } set usage " Usage: @@ -69,6 +70,7 @@ if { $DRYRUN} { set VERBOSE [expr {$params(v)}] set DBDEBUG [expr {$params(d)}] +set ADDSTUDENT [expr {$params(s)}] set classDB [lindex $argv 0] set blackboardDB [lindex $argv 1] @@ -276,7 +278,11 @@ proc addStudentsFromBlackboardDB { db } { # blackboard does not provide the following info set id unknownID set section unknownSection - puts "Blackboard does not provide Section number" + global ADDSTUDENT + if { ! $ADDSTUDENT } { + puts "Skipping user addition: Blackboard does not provide Section number" + return + } set fname [list First Name] set lname [list Last Name] @@ -294,7 +300,11 @@ proc addStudentsFromBlackboardDB { db } { proc addStudentsFromGradescopeDB { db } { # blackboard does not provide the following info set section unknownSection - puts "Gradescope does not provide Section number" + global ADDSTUDENT + if { ! $ADDSTUDENT } { + puts "Skipping user addition: Gradescope does not provide Section number" + return + } set fname [list First Name] set lname [list Last Name] |