aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2011-03-11 20:22:58 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2011-03-11 20:22:58 -0500
commit17a270b18d7a21169fe57a0178c168c5dcf70a86 (patch)
tree91058d4fdf868e31e8a88ad348d19f081cfe77a7
parent7f81a32cf14c8f21b405051b4c64ca844ba6cccb (diff)
downloadGradeBook-17a270b18d7a21169fe57a0178c168c5dcf70a86.tar.gz
GradeBook-17a270b18d7a21169fe57a0178c168c5dcf70a86.zip
default column actions set according to category
Ignore-this: 4b9d2988d7e0d33222b984d04fb1329e darcs-hash:20110312012258-067c0-f0e8fc2819c86bfd652e69a992fe05a00610e0ac.gz
-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"
+ }
+ }
}
}
}