aboutsummaryrefslogtreecommitdiff
path: root/GradeBook.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'GradeBook.tcl')
-rwxr-xr-xGradeBook.tcl24
1 files changed, 14 insertions, 10 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl
index 168902c..d212f34 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -763,18 +763,22 @@ proc ShowControls { permission_list user } {
set user_groups_for_hide [removeElementFromList $grp $user_groups_for_hide]
}
# output group to hide offering
- if { $user_groups_for_hide ne "" } {
- puts "<br>"
- puts "HideGroup: "
- foreach grp $user_groups_for_hide {
- puts "<span class=\"controls\"><a href=\"$script_name?action=userhidegroup&groupname=[::ncgi::encode $grp]\">$grp</a></span>"
+ if { [isActionGranted userhidegroup $permission_list $user] } {
+ if { $user_groups_for_hide ne "" } {
+ puts "<br>"
+ puts "HideGroup: "
+ foreach grp $user_groups_for_hide {
+ puts "<span class=\"controls\"><a href=\"$script_name?action=userhidegroup&groupname=[::ncgi::encode $grp]\">$grp</a></span>"
+ }
}
}
- if { $currently_hidden_groups ne "" } {
- puts "<br>"
- puts {Unhide groups: }
- foreach grp $currently_hidden_groups {
- puts "<span class=\"controls\"><a href=\"$script_name?action=userunhidegroup&groupname=[::ncgi::encode $grp]\">$grp</a></span>"
+ if { [isActionGranted userunhidegroup $permission_list $user] } {
+ if { $currently_hidden_groups ne "" } {
+ puts "<br>"
+ puts {Unhide groups: }
+ foreach grp $currently_hidden_groups {
+ puts "<span class=\"controls\"><a href=\"$script_name?action=userunhidegroup&groupname=[::ncgi::encode $grp]\">$grp</a></span>"
+ }
}
}