aboutsummaryrefslogtreecommitdiff
path: root/importGrades2gradebook.tcl
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2022-05-18 15:49:43 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2022-05-18 15:49:43 -0400
commitd3c197dd0c7527b130608d69e5d666f4c1cbf71e (patch)
tree7cf4e9e40744e27ea62a056c625ec69ed377b562 /importGrades2gradebook.tcl
parent2782d92f06c8c415b207cbddd0ac50a9e8dad255 (diff)
downloadGradeBook-d3c197dd0c7527b130608d69e5d666f4c1cbf71e.tar.gz
GradeBook-d3c197dd0c7527b130608d69e5d666f4c1cbf71e.zip
added another format of BlackBoard column name parcing
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 {}