|
@ -50,7 +50,7 @@ $pageparams->group = groups_get_activity_group($cm, true); |
|
|
$pageparams->init($course->id); |
|
|
$pageparams->init($course->id); |
|
|
$att = new attendance($att, $cm, $course, $PAGE->context, $pageparams); |
|
|
$att = new attendance($att, $cm, $course, $PAGE->context, $pageparams); |
|
|
|
|
|
|
|
|
$allowedgroups = groups_get_activity_allowed_groups($this->cm); |
|
|
$allowedgroups = groups_get_activity_allowed_groups($cm); |
|
|
if (!empty($pageparams->grouptype) && !array_key_exists($groupid, $allowedgroups)) { |
|
|
if (!empty($pageparams->grouptype) && !array_key_exists($groupid, $allowedgroups)) { |
|
|
$group = groups_get_group($pageparams->grouptype); |
|
|
$group = groups_get_group($pageparams->grouptype); |
|
|
throw new moodle_exception('cannottakeforgroup', 'attendance', '', $group->name); |
|
|
throw new moodle_exception('cannottakeforgroup', 'attendance', '', $group->name); |
|
|