aboutsummaryrefslogtreecommitdiff
path: root/importGrades2gradebook.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'importGrades2gradebook.tcl')
-rwxr-xr-ximportGrades2gradebook.tcl6
1 files changed, 5 insertions, 1 deletions
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 {}