From 8f656c0c0236c7d46ba91034adacb945509d0222 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Wed, 10 Mar 2021 22:35:20 -0500 Subject: added more categories --- gradescope2gradebook.tcl | 18 +++++++++++++----- 1 file 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" } -- cgit v1.2.3