From 607cceeb5b16d6c8f6a2e27a05b5abed991fbc17 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Thu, 3 Sep 2015 20:34:36 +1200 Subject: [PATCH] Fixes #148 correct group check --- take.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/take.php b/take.php index 0858ce4..6634995 100644 --- a/take.php +++ b/take.php @@ -51,7 +51,7 @@ $pageparams->init($course->id); $att = new attendance($att, $cm, $course, $PAGE->context, $pageparams); $allowedgroups = groups_get_activity_allowed_groups($cm); -if (!empty($pageparams->grouptype) && !array_key_exists($groupid, $allowedgroups)) { +if (!empty($pageparams->grouptype) && !array_key_exists($pageparams->grouptype, $allowedgroups)) { $group = groups_get_group($pageparams->grouptype); throw new moodle_exception('cannottakeforgroup', 'attendance', '', $group->name); }