aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-04-14 11:05:34 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-04-14 11:05:34 -0400
commit93ee6cedbe725d87c1dda87c387350e43486ad90 (patch)
tree8784ab89ace48c65e5478bcedefbe0a6bb011b4a
parent5c1efcf109a3eb36101877c8e776d70e86ac43c6 (diff)
downloadGradeBook-93ee6cedbe725d87c1dda87c387350e43486ad90.tar.gz
GradeBook-93ee6cedbe725d87c1dda87c387350e43486ad90.zip
more natural order of presorted columns
-rwxr-xr-xGradeBook_lib.tcl13
1 files changed, 11 insertions, 2 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index 7758abf..b6fbee4 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -1548,9 +1548,18 @@ proc htmlDBout {db permission_list user {sort_col {}}} {
lappend column_list UserName
}
- # put columns with Totals up front
- set head_list {}
+ ## This section rearrange shown column
+ set head_list {FirstName LastName UserName GroupName IdNum SectionNum}
set tail_list {}
+ # reduce column list
+ set new_column_list {}
+ foreach col $column_list {
+ if {$col in $head_list} { continue }
+ if {$col in $tail_list} { continue }
+ lappend new_column_list $col
+ }
+ set column_list $new_column_list
+ # put columns with Totals up front
foreach col $column_list {
#puts $col
if { [regexp -nocase -- {total} $col] } {