From d3c197dd0c7527b130608d69e5d666f4c1cbf71e Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Wed, 18 May 2022 15:49:43 -0400 Subject: added another format of BlackBoard column name parcing --- importGrades2gradebook.tcl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/importGrades2gradebook.tcl b/importGrades2gradebook.tcl index 61d21a3..5995686 100755 --- a/importGrades2gradebook.tcl +++ b/importGrades2gradebook.tcl @@ -175,7 +175,11 @@ proc parseBlackboardColName { col } { set type Score set result [regexp -nocase {(.*) (\[Total Pts:.*)} $col match shortCol scoreStr] if { $result} { - set result [regexp -nocase {\[Total Pts: (\d+)} $scoreStr match maxScore] + # Blackboard has column names in two formats + # 1: Mid-term Exam 2 - TOTAL [Total Pts: 100 Score] + # 2: Mid-term Exam 2 - TOTAL [Total Pts: up to 100 Score] + # they are different by "up to" insertion but both allow to see max score + set result [regexp -nocase {\[Total Pts:( | up to )(\d+)} $scoreStr match spacing maxScore] set result [regexp -nocase {\[Total Pts: (\d+) Percentage} $scoreStr match] if { $result } { set type Percentage } set number {} -- cgit v1.2.3