diff options
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-x | GradeBook_lib.tcl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index 59749a2..58c2ac8 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -1031,7 +1031,7 @@ proc number2letter_grade { num } { return "NA" } -proc htmlGradesTableHeadersRaw { permission_list user sql_column_str hidden_columns v_array_list } { +proc htmlGradesTableHeadersRaw { permission_list user sql_column_str hidden_columns v_array_list sort_col} { global GradebookServerConfig global script_name array set permission $permission_list @@ -1051,7 +1051,12 @@ proc htmlGradesTableHeadersRaw { permission_list user sql_column_str hidden_colu } else { set category [SelectColValue4User $col _Col_Category_] } - puts -nonewline "<th class=\"$category\"><a href=\"$script_name?action=sort&sortCol=$col\">$col</a>" + set sort_symbol "↓"; # down arrow + set col_text "$col" + if { $col eq $sort_col } { + set col_text "$col_text$sort_symbol" + } + puts -nonewline "<th class=\"$category\"><a href=\"$script_name?action=sort&sortCol=$col\">$col_text</a>" # below list has action and action_label pairs set action_list {userhidecolumn} switch $col { @@ -1412,7 +1417,7 @@ proc htmlDBout {db permission_list user {sort_col {}}} { set show_header 0 puts {<table class="gradestable" border="1">} set v_array_list [array get v] - htmlGradesTableHeadersRaw $permission_list $user $sql_column_str $hidden_columns $v_array_list + htmlGradesTableHeadersRaw $permission_list $user $sql_column_str $hidden_columns $v_array_list $sort_col htmlFormatMaxPossibleRaw $sql_column_str $hidden_columns puts [htmlFormatTheStatsForGradeRaw high $sql_column_str $hidden_columns] puts [htmlFormatTheStatsForGradeRaw mean $sql_column_str $hidden_columns] |