From e162447d60b0bf1503df77b5844adf3780d85bdf Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sun, 27 Mar 2022 18:36:01 -0400 Subject: enable creation of users from gradescope and blackboard --- importGrades2gradebook.tcl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'importGrades2gradebook.tcl') 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 -- cgit v1.2.3