summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xGradeBook_lib.tcl28
1 files changed, 19 insertions, 9 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index e5eaa2c..6a563c5 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -534,15 +534,25 @@ proc htmlDBout {db permission_list user {sort_col {}}} {
GroupName { }
SectionNum { }
default {
- if { $category eq "weighted_column" } {
- # modify actions for weighted_column
- } else {
- lappend action_list changegrades "change grades" deletecolumn delete changecolumn "change column"
- }
- if { [SelectColValue4User $col _Visible_To_Students_] eq "true" } {
- lappend action_list hidecolfromstudents "hide from students"
- } else {
- lappend action_list unhidecolfromstudents "show to students"
+ switch $category {
+ "weighted_column" {
+ # modify actions for weighted_column
+ if { $permission(GroupName) eq "instructor" } {
+ if { [SelectColValue4User $col _Visible_To_Students_] eq "true" } {
+ lappend action_list hidecolfromstudents "hide from students"
+ } else {
+ lappend action_list unhidecolfromstudents "show to students"
+ }
+ }
+ }
+ default {
+ lappend action_list changegrades "change grades" deletecolumn delete changecolumn "change column"
+ if { [SelectColValue4User $col _Visible_To_Students_] eq "true" } {
+ lappend action_list hidecolfromstudents "hide from students"
+ } else {
+ lappend action_list unhidecolfromstudents "show to students"
+ }
+ }
}
}
}