diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-02-16 10:53:51 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-02-16 10:53:51 -0500 |
commit | cacac36e455efccc61ec27d9a87854a5941c39f6 (patch) | |
tree | 76417dcc2e65d5357d227043d9ef46dafc25dedc /GradeBook_lib.tcl | |
parent | bdc6a3a084d44a1dcbe20f7ec28dbf43cc3f4b7d (diff) | |
download | GradeBook-cacac36e455efccc61ec27d9a87854a5941c39f6.tar.gz GradeBook-cacac36e455efccc61ec27d9a87854a5941c39f6.zip |
added request of UserName from sql table in all cases, but its output depends on hidden_column variable
Ignore-this: 55ece3b31b2a25c7d3a3389dbd900696
darcs-hash:20110216155351-067c0-bbc964e4d6ca69863dd1fee6d987d369b7d4bcfa.gz
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-x | GradeBook_lib.tcl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index 81a22a4..b2dbfa7 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -198,6 +198,11 @@ proc htmlDBout {db permission_list user {sort_col {}}} { foreach col $hidden_columns { set column_list [removeElementFromList $col $column_list] } + # add UserName column since a lot depends on it knowledge + if {{UserName} ni $column_list} { + lappend column_list UserName + } + set sql_column_str [colList2sqlColStr $column_list] # set users of what group user can see, i.e. set WHERE statement set where_statement {} @@ -230,6 +235,7 @@ proc htmlDBout {db permission_list user {sort_col {}}} { puts {<table class="gradestable" border="1">} puts "<tr>" foreach col $v(*) { + if { $col in $hidden_columns } continue # detect what column category it is set category [SelectColValue4User $col _Col_Category_] puts -nonewline "<th class=\"$category\"><a href=\"$script_name?action=sort&sortCol=$col\">$col</a>" @@ -270,6 +276,7 @@ proc htmlDBout {db permission_list user {sort_col {}}} { set user_shown "_UNSET_" } foreach index $v(*) { + if { $index in $hidden_columns } continue if { $index != "*" } { # detect what column category it is set category [SelectColValue4User $index _Col_Category_] |