From 483e37e90a9aed298359364fb9eb695e4edac251 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sun, 27 Mar 2022 20:11:27 -0400 Subject: improved splitting to assignment and its number procedure --- importGrades2gradebook.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'importGrades2gradebook.tcl') 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} -- cgit v1.2.3