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'));
$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 {
}
}
- 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 {