diff options
-rwxr-xr-x | gradescope2gradebook.tcl | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gradescope2gradebook.tcl b/gradescope2gradebook.tcl index beeacbb..457cedd 100755 --- a/gradescope2gradebook.tcl +++ b/gradescope2gradebook.tcl @@ -104,9 +104,7 @@ set idnum [list SID] set eval_str [concat SELECT * FROM 'export_table'] set err [catch { gdb eval $eval_str v { - #AddUserNonWeb $fname $lname $email student $id $sect AddUserNonWeb $v($fname) $v($lname) $v(Email) student $v($idnum) 1 - #addStudent db $v($idnum) $v(Contact) } } errStat ] iferror $err $errStat @@ -125,11 +123,21 @@ foreach col [getColListFromAnyTable gdb export_table] { puts "Adding: ${shortCol}" set result [regexp -nocase "pre-lab" $shortCol match] if { $result} { - AddColumnNonWeb $shortCol Quiz 10 + AddColumnNonWeb $shortCol PreLab 10 continue } - # everything else is labreport - AddColumnNonWeb $shortCol LabReport 100 + set result [regexp -nocase "homework" $shortCol match] + if { $result} { + AddColumnNonWeb $shortCol HomeWork 20 + continue + } + set result [regexp -nocase "lab" $shortCol match] + if { $result} { + AddColumnNonWeb $shortCol LabReport 50 + continue + } + # everything else is Note + AddColumnNonWeb $shortCol Note 0 } else { #puts "$col: exists" } |