Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-31510_group_activities_22' of git://github.com/andy…

…jdavis/moodle into MOODLE_22_STABLE
  • Loading branch information...
commit 8a8f68ff976e8059f14d14713f3f519e91f447f5 2 parents b969338 + 79c0996
@samhemelryk samhemelryk authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 grade/report/user/lib.php
View
13 grade/report/user/lib.php
@@ -345,6 +345,19 @@ private function fill_table_recursive(&$element) {
($this->showhiddenitems == GRADE_REPORT_USER_HIDE_UNTIL && !$grade_grade->is_hiddenuntil()))) {
// return false;
} else {
+ // The grade object can be marked visible but still be hidden
+ // if "enablegroupmembersonly" is on and its an activity assigned to a grouping the user is not in
+ if (!empty($grade_object->itemmodule) && !empty($grade_object->iteminstance)) {
+
+ $instances = $this->gtree->modinfo->get_instances();
+ if (!empty($instances[$grade_object->itemmodule][$grade_object->iteminstance])) {
+ $cm = $instances[$grade_object->itemmodule][$grade_object->iteminstance];
+ if (!$cm->uservisible) {
+ return false;
+ }
+ }
+ }
+
/// Excluded Item
if ($grade_grade->is_excluded()) {
$fullname .= ' ['.get_string('excluded', 'grades').']';
Please sign in to comment.
Something went wrong with that request. Please try again.