Skip to content

Commit

Permalink
Display no groups warning only on activity settings page (issue #214)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoAlexH committed Nov 12, 2024
1 parent 0f71c05 commit 71be1d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 71be1d6

Please sign in to comment.