Browse Source

Fixes #266 - groupmemembersonly setting removed by MDL-44725

MOODLE_31_STABLE
Dan Marsden 8 years ago
parent
commit
3b88a4441c
  1. 4
      classes/structure.php
  2. 2
      lib.php
  3. 2
      renderer.php

4
classes/structure.php

@ -578,7 +578,7 @@ class mod_attendance_structure {
if ($page) { if ($page) {
$usersperpage = $this->pageparams->perpage; $usersperpage = $this->pageparams->perpage;
if (!empty($CFG->enablegroupmembersonly) and $this->cm->groupmembersonly) { if (!empty($this->cm->groupingid)) {
$startusers = ($page - 1) * $usersperpage; $startusers = ($page - 1) * $usersperpage;
if ($groupid == 0) { if ($groupid == 0) {
$groups = array_keys(groups_get_all_groups($this->cm->course, 0, $this->cm->groupingid, 'g.id')); $groups = array_keys(groups_get_all_groups($this->cm->course, 0, $this->cm->groupingid, 'g.id'));
@ -595,7 +595,7 @@ class mod_attendance_structure {
$orderby, $startusers, $usersperpage); $orderby, $startusers, $usersperpage);
} }
} else { } else {
if (!empty($CFG->enablegroupmembersonly) and $this->cm->groupmembersonly) { if (!empty($this->cm->groupingid)) {
if ($groupid == 0) { if ($groupid == 0) {
$groups = array_keys(groups_get_all_groups($this->cm->course, 0, $this->cm->groupingid, 'g.id')); $groups = array_keys(groups_get_all_groups($this->cm->course, 0, $this->cm->groupingid, 'g.id'));
} else { } else {

2
lib.php

@ -39,8 +39,6 @@ function attendance_supports($feature) {
return true; return true;
case FEATURE_GROUPINGS: case FEATURE_GROUPINGS:
return true; return true;
case FEATURE_GROUPMEMBERSONLY:
return true;
case FEATURE_MOD_INTRO: case FEATURE_MOD_INTRO:
return true; return true;
case FEATURE_BACKUP_MOODLE2: case FEATURE_BACKUP_MOODLE2:

2
renderer.php

@ -412,7 +412,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) { if ($group == 0) {
$groups = array_keys(groups_get_all_groups($takedata->cm->course, 0, $takedata->cm->groupingid, 'g.id')); $groups = array_keys(groups_get_all_groups($takedata->cm->course, 0, $takedata->cm->groupingid, 'g.id'));
} else { } else {

Loading…
Cancel
Save