diff --git a/mod_form.php b/mod_form.php index 3935a7a..377b72e 100644 --- a/mod_form.php +++ b/mod_form.php @@ -75,7 +75,8 @@ public function definition() { $groups[$group->id]->id = $group->id; } - if (count($dbgroups) < 1) { + //Display warning if no groups are set + if ($PAGE->pagetype === 'mod-choicegroup-mod' && count($dbgroups) < 1) { $a = new stdClass(); $a->linkgroups = $CFG->wwwroot . '/group/index.php?id=' . $COURSE->id; $a->linkcourse = $CFG->wwwroot . '//course/view.php?id=' . $COURSE->id;