diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2022-03-27 20:11:27 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2022-03-27 20:11:27 -0400 |
commit | 483e37e90a9aed298359364fb9eb695e4edac251 (patch) | |
tree | 957e2517aa7d91e4e5835f837281da6b2a87572b | |
parent | cac82518c6d93386c42f3e89f967b4c82d03f0e0 (diff) | |
download | GradeBook-483e37e90a9aed298359364fb9eb695e4edac251.tar.gz GradeBook-483e37e90a9aed298359364fb9eb695e4edac251.zip |
improved splitting to assignment and its number procedure
-rwxr-xr-x | importGrades2gradebook.tcl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/importGrades2gradebook.tcl b/importGrades2gradebook.tcl index b24a1ae..a0d546c 100755 --- a/importGrades2gradebook.tcl +++ b/importGrades2gradebook.tcl @@ -178,8 +178,10 @@ proc parseBlackboardColName { col } { if { $result } { set type Percentage } 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] - set result [regexp -nocase {(\S+)\s+$} $name match name] + # remove trailing whitespace + set result [regsub -nocase {\s+$} $name "" name] switch $name { HW { set name Homework ; set category HomeWork } Lab { set name Lab ; set category LabReport} |