diff options
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-x | GradeBook_lib.tcl | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index b52792f..7b7fd7f 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -1248,6 +1248,7 @@ proc AddColumnRequest { permission_list user } { proc ShowControls { permission_list user } { array set permission $permission_list global script_name + global grades_category dbg "outputing contol list" puts "<div class=\"controls\">" set action_list [ list \ @@ -1299,6 +1300,34 @@ proc ShowControls { permission_list user } { } } } + + # hide user grades category + set grades_category_for_hide $grades_category + #set currently_hidden_grades_category [SelectColValue4User UserHiddenGradeCategories $user] + set currently_hidden_grades_category Quiz; #debug + # remove already hidden category from offering + foreach grd_category $currently_hidden_grades_category { + set grades_category_for_hide [removeElementFromList $grd_category $grades_category_for_hide] + } + # output grades category to hide offering + if { [isActionGranted userhidegroup $permission_list $user] } { + if { $grades_category_for_hide ne "" } { + puts "<br>" + puts "Hide grades in category: " + foreach ctgry $grades_category_for_hide { + puts "<span class=\"controls\"><a href=\"$script_name?action=userhidegradecategory&grades_category=[::ncgi::encode $ctgry]\">$ctgry</a></span>" + } + } + } + if { [isActionGranted userunhidegroup $permission_list $user] } { + if { $currently_hidden_grades_category ne "" } { + puts "<br>" + puts {Unhide grades in category: } + foreach ctgry $currently_hidden_grades_category { + puts "<span class=\"controls\"><a href=\"$script_name?action=userunhidegradecategory&grades_category=[::ncgi::encode $ctgry]\">$ctgry</a></span>" + } + } + } puts "</div>" } |