From 6598331e5c1ca10a6a58bf874ec9378832cea641 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sun, 27 Mar 2022 20:50:17 -0400 Subject: added -s flag to add user even with incomplete info --- importGrades2gradebook.tcl | 14 ++++++++++++-- 1 file 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] -- cgit v1.2.3