diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2022-03-27 18:36:01 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2022-03-27 18:36:01 -0400 |
commit | e162447d60b0bf1503df77b5844adf3780d85bdf (patch) | |
tree | 5ab4a4f39ee42094c8f963f1b9a61b7de629f8e0 | |
parent | 240ca89a437cf6ed766a8e4f11d796862ddded61 (diff) | |
download | GradeBook-e162447d60b0bf1503df77b5844adf3780d85bdf.tar.gz GradeBook-e162447d60b0bf1503df77b5844adf3780d85bdf.zip |
enable creation of users from gradescope and blackboard
-rwxr-xr-x | importGrades2gradebook.tcl | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/importGrades2gradebook.tcl b/importGrades2gradebook.tcl index f05b273..3f3fb7d 100755 --- a/importGrades2gradebook.tcl +++ b/importGrades2gradebook.tcl @@ -270,16 +270,16 @@ proc addStudentsFromBlackboardDB { db } { # blackboard does not provide the following info set id unknownID set section unknownSection - puts "Blackboard does not provide Student ID and Section number, skipping user addition" - return + puts "Blackboard does not provide Section number" set fname [list First Name] set lname [list Last Name] + set idnum [list Student ID] set eval_str [concat SELECT * FROM 'export_table'] set err [catch { $db eval $eval_str v { set username [blackboardUsername2local $v(Username)] - dbRequest [list AddUserNonWeb $v($fname) $v($lname) $username student $id $section] + dbRequest [list AddUserNonWeb $v($fname) $v($lname) $username student $v($idnum) $section] } } errStat ] iferror $err $errStat @@ -288,8 +288,7 @@ proc addStudentsFromBlackboardDB { db } { proc addStudentsFromGradescopeDB { db } { # blackboard does not provide the following info set section unknownSection - puts "Gradescope does not provide Section number, skipping user addition" - return + puts "Gradescope does not provide Section number" set fname [list First Name] set lname [list Last Name] @@ -299,7 +298,7 @@ proc addStudentsFromGradescopeDB { db } { $db eval $eval_str v { set username [gradescopeUsername2local $v(Email)] set id $v($idnum) - dbRequest [list AddUserNonWeb $v($fname) $v($lname) $username student $id $section] + dbRequest [list AddUserNonWeb $v($fname) $v($lname) $username student $v($idnum) $section] } } errStat ] iferror $err $errStat |