From 7ba1186326adb7c7e6369c0a8b9370ac08946b44 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Fri, 12 May 2023 17:11:43 -0400 Subject: updated some edge case --- importGrades2gradebook.tcl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/importGrades2gradebook.tcl b/importGrades2gradebook.tcl index 6aad15d..55f55f4 100755 --- a/importGrades2gradebook.tcl +++ b/importGrades2gradebook.tcl @@ -203,15 +203,19 @@ proc parseBlackboardColName { col } { set number {} set name $shortCol # split away count/number, e.g. "Homework 01" -> "Homework " and "01" - set result [regexp -nocase {(\D+)(\d+)} $shortCol match name number] + puts "sc: $shortCol" + set result [regexp -nocase {(\D*\d*\D+)(\d+)} $shortCol match name number] # remove trailing whitespace set result [regsub -nocase {\s+$} $name "" name] + puts "n: $name" switch $name { Homework { set name Homework ; set category HomeWork } HW { set name Homework ; set category HomeWork } "Lab report" { set name Lab ; set category LabReport} "Lab Report" { set name Lab ; set category LabReport} "Midterm" { set name "MidTerm Exam" ; set category MidTerm } + "Midterm1p" { set category MidTerm } + "Midterm2p" { set category MidTerm } "Midterm Exam" { set name "MidTerm Exam" ; set category MidTerm } "Mid-term Exam" { set name "MidTerm Exam" ; set category MidTerm } HW { set name Homework ; set category HomeWork } @@ -276,6 +280,7 @@ proc parseGradescopeColName { col } { Homework { set name Homework ; set category HomeWork } Lab { set name Lab ; set category LabReport} Labbook { set name Logbook ; set category LogBook} + "ndTimeHW" { set name "2ndTimeHW"; set category HomeWork } "Final Project Design" { set category FinalExam } "Final Project Report" { set category FinalExam } default { } -- cgit v1.2.3