From: nicolasconnault Date: Thu, 30 Apr 2009 08:40:22 +0000 (+0000) Subject: MDL-19028 Hiding hidden category from student report instead of grade items. See... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9e322c8c548127e8cefee00f7b3da794a0518c46;p=moodle.git MDL-19028 Hiding hidden category from student report instead of grade items. See code diff for better explanation. Merged from MOODLE_19_STABLE --- diff --git a/grade/report/user/lib.php b/grade/report/user/lib.php index f508bd25f2..a261d5b179 100644 --- a/grade/report/user/lib.php +++ b/grade/report/user/lib.php @@ -206,8 +206,8 @@ class grade_report_user extends grade_report { $excluded = ''; $class = ''; - // If this is a hidden grade item, hide it completely from the user. showhiddenitems: 0 = hide all, 1 = show only hidden until, 2 = show all - if ($grade_object->is_hidden() && !$this->canviewhidden && ( + // If this is a hidden grade category, hide it completely from the user. showhiddenitems: 0 = hide all, 1 = show only hidden until, 2 = show all + if ($type == 'category' && $grade_object->is_hidden() && !$this->canviewhidden && ( $this->showhiddenitems == 0 || ($this->showhiddenitems == 1 && !$grade_object->is_hiddenuntil()))) { return false;