aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2022-03-27 20:50:17 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2022-03-27 20:50:17 -0400
commit6598331e5c1ca10a6a58bf874ec9378832cea641 (patch)
treebf3f0b6f1fbb8c7b0f79a1e953925f3a95b3ea06
parentfc212d6242dd354e19a7f3aa4281e722cdc45400 (diff)
downloadGradeBook-6598331e5c1ca10a6a58bf874ec9378832cea641.tar.gz
GradeBook-6598331e5c1ca10a6a58bf874ec9378832cea641.zip
added -s flag to add user even with incomplete info
-rwxr-xr-ximportGrades2gradebook.tcl14
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]