diff options
Diffstat (limited to 'blackboard2gradebook.tcl')
-rwxr-xr-x | blackboard2gradebook.tcl | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/blackboard2gradebook.tcl b/blackboard2gradebook.tcl index 9ac1be6..1ddd55a 100755 --- a/blackboard2gradebook.tcl +++ b/blackboard2gradebook.tcl @@ -179,6 +179,18 @@ proc updateGrade { col locUname grade } { } } +proc pickCols2import { cols2import skipCreationCol } { + set reduced_list {} + foreach col $cols2import { + if { [isInList $col $skipCreationCol] } { + puts "skipping column $col" + continue + } + lappend reduced_list $col + } + return $reduced_list +} + ######################### START of the execution ######################### set dryrun true @@ -191,11 +203,11 @@ addStudentsFromDB bdb # now for every user add their grades set username_list [getBlackboardUsernames bdb] -foreach col [getColListFromAnyTable bdb export_table] { - if { [isInList $col $skipCreationCol] } { - puts "skipping column $col" - continue - } +set cols2import [getColListFromAnyTable bdb export_table] + +set cols2import [ pickCols2import $cols2import $skipCreationCol ] + +foreach col $cols2import { set colInfo [trimColName $col] set shortCol [lindex $colInfo 0] set category [lindex $colInfo 1] |