aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-10-27 17:33:05 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-10-27 17:33:05 -0400
commit97d6edeb00ea7760690da49014571e543b2c7c3c (patch)
tree57c53baca05fcdf1132a235941bb57e6bcbeb650
parentf713df745cc4bc9848c9b68add69d4ef4cdf41e7 (diff)
downloadGradeBook-97d6edeb00ea7760690da49014571e543b2c7c3c.tar.gz
GradeBook-97d6edeb00ea7760690da49014571e543b2c7c3c.zip
fixes
-rwxr-xr-ximportGrades2gradebook.tcl9
1 files changed, 9 insertions, 0 deletions
diff --git a/importGrades2gradebook.tcl b/importGrades2gradebook.tcl
index bd66e14..954f6b2 100755
--- a/importGrades2gradebook.tcl
+++ b/importGrades2gradebook.tcl
@@ -220,6 +220,12 @@ proc parseGradescopeColName { col } {
set name $shortCol
set result [regexp -nocase {(\D+)(\d+)} $shortCol match name number]
set result [regexp -nocase {(\S+)\s+$} $name match name]
+ if { [regexp -nocase {Pre-lab} $name match dummy] } {
+ set category HomeWork;
+ }
+ if { [regexp -nocase {Report} $name match dummy] } {
+ set category LabReport;
+ }
switch $name {
Homework { set name Homework ; set category HomeWork }
Lab { set name Lab ; set category LabReport}
@@ -431,6 +437,9 @@ set cols2import [ pickCols2import $cols2import $skipCreationCol $categories2impo
foreach col $cols2import {
set colInfo [parseColName $col]
set shortCol [lindex $colInfo 0]
+ set category [lindex $colInfo 1]
+ set maxScore [lindex $colInfo 2]
+ puts "==========> $colInfo"
if { ![doesColumnExists $shortCol GradesTable] } {
dbRequest [list AddColumnNonWeb $shortCol $category $maxScore]
}