diff options
-rwxr-xr-x | importGrades2gradebook.tcl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/importGrades2gradebook.tcl b/importGrades2gradebook.tcl index ff547e8..bd66e14 100755 --- a/importGrades2gradebook.tcl +++ b/importGrades2gradebook.tcl @@ -206,11 +206,16 @@ proc parseGradescopeColName { col } { set maxScore 0 set type Score + global username_list + set infoColumsMarkers {{ - Lateness \(H:M:S\)} { - Max Points} { - Submission Time} {Total Lateness \(H:M:S\)}} if { [isInList $col $infoColumsMarkers] } { return [list $shortCol $category $maxScore $type] } + set colWithMaxScore "$shortCol - Max Points" + set maxScore [getForeignDBUserGrade foreignDB [lindex $username_list 0] $colWithMaxScore ] + set number {} set name $shortCol set result [regexp -nocase {(\D+)(\d+)} $shortCol match name number] @@ -387,7 +392,7 @@ proc alias {alias target} { ######################### START of the execution ######################### # using heuristic to detect foreign DB origin -set allForeignCols [getColListFromAnyTable foreignDB export_table]; # important global +set allForeignCols [getColListFromAnyTable foreignDB export_table] set dbOrigin Blackboard; # default if { {SID} in $allForeignCols } { set dbOrigin Gradescope } puts [list Detected foreign DB origin: $dbOrigin] @@ -418,7 +423,7 @@ switch $dbOrigin { addStudentsFromForeignDB foreignDB # now for every user add their grades -set username_list [getForeignDBUsernames foreignDB] +set username_list [getForeignDBUsernames foreignDB]; # important, will be used as global set cols2import [getColListFromAnyTable foreignDB export_table] set cols2import [ pickCols2import $cols2import $skipCreationCol $categories2import] |