### Eclipse Workspace Patch 1.0 #P moodle Index: grade/report/user/lib.php =================================================================== RCS file: /cvsroot/moodle/moodle/grade/report/user/lib.php,v retrieving revision 1.18.2.19 diff -u -r1.18.2.19 lib.php --- grade/report/user/lib.php 23 Apr 2009 20:20:03 -0000 1.18.2.19 +++ grade/report/user/lib.php 25 Apr 2009 09:13:06 -0000 @@ -213,6 +213,15 @@ return false; } + // hide items, inaccessible by group/grouping + if ($type == 'item') { + $modinfo =& get_fast_modinfo($this->course, $this->user->id); + $cm =& $modinfo->instances[$grade_object->itemmodule][$grade_object->iteminstance]; + if (!$cm->uservisible) { + return false; + } + } + if ($type == 'category') { $this->evenodd[$depth] = (($this->evenodd[$depth] + 1) % 2); }