Skip to content

Commit

Permalink
Merge pull request #234 from ndunand/dev
Browse files Browse the repository at this point in the history
Display no groups warning only on activity settings page
  • Loading branch information
NicoAlexH authored Nov 13, 2024
2 parents 0f71c05 + 73dc4a8 commit 7fad595
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 7fad595

Please sign in to comment.