aboutsummaryrefslogtreecommitdiff
path: root/GradeBook_lib.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-xGradeBook_lib.tcl17
1 files changed, 16 insertions, 1 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index b6fbee4..842a8dd 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -13,6 +13,8 @@ source ./libBasicTableOperations.tcl
# internal version of this code
set VERSION 2.0.0
+set sticky_colums_list [list FirstName LastName UserCount ]
+
# ########################################################################
# this should be in config file but these are reasonable defaults
array set GradebookServerConfig [list \
@@ -1198,6 +1200,10 @@ proc htmlGradesTableHeadersRaw { permission_list user sql_column_str hidden_colu
} else {
set category [SelectColValue4User $col _Col_Category_]
}
+ global sticky_colums_list
+ if { $col in $sticky_colums_list } {
+ set category "$category $col sticky-col"
+ }
set sort_symbol "↓"; # down arrow
set col_text "$col"
if { $col eq "UserCount" } {
@@ -1289,6 +1295,7 @@ proc htmlFormatMaxPossibleRaw { sql_column_str hidden_columns } {
array set v [getColAndValForUserName _Max_Points_ $sql_column_str $hidden_columns]
# we need to prepend column list with UserCount column, so the counter appears first
set v(*) [linsert $v(*) 0 UserCount]
+ global sticky_colums_list
foreach c $v(*) {
if { $c in $hidden_columns } continue
switch $c {
@@ -1305,7 +1312,11 @@ proc htmlFormatMaxPossibleRaw { sql_column_str hidden_columns } {
}
}
}
- puts "<td> <b>$out_str</b> </td>"
+ set category ""
+ if { $c in $sticky_colums_list } {
+ set category "$category $c sticky-col"
+ }
+ puts "<td class=\"$category\"> <b>$out_str</b> </td>"
}
puts "</tr>"
}
@@ -1404,6 +1415,10 @@ proc htmlFormatColVal { col_value columnname user user_shown permission_list {fo
set category [SelectColValue4User $columnname _Col_Category_]
set max_points [SelectColValue4User $columnname _Max_Points_]
}
+ global sticky_colums_list
+ if { $columnname in $sticky_colums_list } {
+ set category "$category $columnname sticky-col"
+ }
set special_user_names [list _Max_Points_ _The_Highest_Grade_ _The_Lowest_Grade_ _The_Mean_Grade_ _The_Median_Grade_ _The_StDev_Grade_ ]
if { (([SelectColValue4User GroupName $user_shown] ne "inforow") || ($user in $special_user_names)) && ($category eq "weighted_column") && ($max_points != 0) } {
if { $col_value eq "" } {