aboutsummaryrefslogtreecommitdiff
path: root/GradeBook_lib.tcl
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-03-18 11:39:45 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-03-18 11:39:45 -0400
commit0b8502914fd61e9b304cd5ee0ec0027e2341acf6 (patch)
treedea7628e438248e2973fbdb94d7549982ec9e969 /GradeBook_lib.tcl
parentd28fb96fb44c6bc338cf08a6eb1eba3c307935f4 (diff)
downloadGradeBook-0b8502914fd61e9b304cd5ee0ec0027e2341acf6.tar.gz
GradeBook-0b8502914fd61e9b304cd5ee0ec0027e2341acf6.zip
colums with Totals are shown first
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-xGradeBook_lib.tcl15
1 files changed, 15 insertions, 0 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index 599c8e6..a7705b3 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -1548,6 +1548,21 @@ proc htmlDBout {db permission_list user {sort_col {}}} {
lappend column_list UserName
}
+ # put columns with Totals up front
+ set head_list {}
+ set tail_list {}
+ foreach col $column_list {
+ #puts $col
+ if { [regexp -nocase -- {total} $col] } {
+ lappend head_list $col
+ } else {
+ lappend tail_list $col
+ }
+ }
+ set column_list {}
+ lappend column_list {*}$head_list
+ lappend column_list {*}$tail_list
+
set sql_column_str [colList2sqlColStr $column_list]
# set users of what group user can see, i.e. set WHERE statement
set where_statement {}