aboutsummaryrefslogtreecommitdiff
path: root/importGrades2gradebook.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'importGrades2gradebook.tcl')
-rwxr-xr-ximportGrades2gradebook.tcl4
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}