diff options
Diffstat (limited to 'GradeBook.tcl')
-rwxr-xr-x | GradeBook.tcl | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl index c1d472a..bb414a1 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -158,6 +158,8 @@ proc htmlDBout {db permission_list user {sort_col {}}} { guest { set hidden_columns $column_list } default { set hidden_columns $column_list } } + # add user hidden columns + set hidden_columns [concat $hidden_columns [SelectColValue4User UserHiddenColums $user]] # remove hidden columns from sql request foreach col $hidden_columns { set column_list [removeElementFromList $col $column_list] @@ -377,13 +379,16 @@ proc ChoseAction {action permission_list user} { proc UserHideColumn { permission_list user } { set columnname [::ncgi::value columnname {}] - set currently_hidden_colimns [SelectColValue4User UserHiddenColums $user] - lappend currently_hidden_colimns $columnname - UpdateColValue4UserNameNonWeb UserHiddenColums $user $currently_hidden_colimns + set currently_hidden_columns [SelectColValue4User UserHiddenColums $user] + lappend currently_hidden_columns $columnname + UpdateColValue4UserNameNonWeb UserHiddenColums $user $currently_hidden_columns } proc UserUnHideColumn { permission_list user } { set columnname [::ncgi::value columnname {}] + set currently_hidden_columns [SelectColValue4User UserHiddenColums $user] + set currently_hidden_columns [removeElementFromList $columnname $currently_hidden_columns] + UpdateColValue4UserNameNonWeb UserHiddenColums $user $currently_hidden_columns } proc ChangeColumn { permission_list user } { @@ -684,7 +689,15 @@ proc ShowControls { permission_list user } { puts -nonewline "$separator<span class=\"controls\"><a href=$script_name?action=$act>$act_label</a></span>" } } - puts "" + puts "<br>" + # unhide user hidden columns actions + set currently_hidden_columns [SelectColValue4User UserHiddenColums $user] + if { $currently_hidden_columns ne "" } { + puts {Unhide columns: } + foreach col $currently_hidden_columns { + puts "<span class=\"controls\"><a href=\"$script_name?action=userunhidecolumn&columnname=[::ncgi::encode $col]\">$col</a></span>" + } + } puts "</div>" } |