Skip to content

Commit 201c535

Browse files
micahernedanmarsden
authored andcommitted
Fixes #808. Allow taking of attendance for non-participation groups.
1 parent 53f632f commit 201c535

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

take.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
$att = new mod_attendance_structure($att, $cm, $course, $PAGE->context, $pageparams);
5555

5656
$allowedgroups = groups_get_activity_allowed_groups($cm);
57-
if (!empty($pageparams->grouptype) && !array_key_exists($pageparams->grouptype, $allowedgroups)) {
57+
$accessallgroups = has_capability('moodle/site:accessallgroups', $context);
58+
if (!$accessallgroups && !empty($pageparams->grouptype) && !array_key_exists($pageparams->grouptype, $allowedgroups)) {
5859
$group = groups_get_group($pageparams->grouptype);
5960
throw new moodle_exception('cannottakeforgroup', 'attendance', '', $group->name);
6061
}

0 commit comments

Comments
 (0)