From 9e322c8c548127e8cefee00f7b3da794a0518c46 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 30 Apr 2009 08:40:22 +0000 Subject: [PATCH] MDL-19028 Hiding hidden category from student report instead of grade items. See code diff for better explanation. Merged from MOODLE_19_STABLE --- grade/report/user/lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5