diff --git a/classes/structure.php b/classes/structure.php index c271091..5176f6c 100644 --- a/classes/structure.php +++ b/classes/structure.php @@ -711,7 +711,7 @@ class mod_attendance_structure { if ($page) { $usersperpage = $this->pageparams->perpage; - if (!empty($CFG->enablegroupmembersonly) and $this->cm->groupmembersonly) { + if (!empty($this->cm->groupingid)) { $startusers = ($page - 1) * $usersperpage; if ($groupid == 0) { $groups = array_keys(groups_get_all_groups($this->cm->course, 0, $this->cm->groupingid, 'g.id')); @@ -728,7 +728,7 @@ class mod_attendance_structure { $orderby, $startusers, $usersperpage); } } else { - if (!empty($CFG->enablegroupmembersonly) and $this->cm->groupmembersonly) { + if (!empty($this->cm->groupingid)) { if ($groupid == 0) { $groups = array_keys(groups_get_all_groups($this->cm->course, 0, $this->cm->groupingid, 'g.id')); } else { diff --git a/lib.php b/lib.php index c777247..61e6acb 100644 --- a/lib.php +++ b/lib.php @@ -40,8 +40,6 @@ function attendance_supports($feature) { return true; case FEATURE_GROUPINGS: return true; - case FEATURE_GROUPMEMBERSONLY: - return true; case FEATURE_MOD_INTRO: return true; case FEATURE_BACKUP_MOODLE2: diff --git a/renderer.php b/renderer.php index 804be73..9e081f7 100644 --- a/renderer.php +++ b/renderer.php @@ -492,7 +492,7 @@ class mod_attendance_renderer extends plugin_renderer_base { } } - if (!empty($CFG->enablegroupmembersonly) and $takedata->cm->groupmembersonly) { + if (!empty($takedata->cm->groupingid)) { if ($group == 0) { $groups = array_keys(groups_get_all_groups($takedata->cm->course, 0, $takedata->cm->groupingid, 'g.id')); } else {