Skip to content

Commit

Permalink
MDL-60145 course: fix bug with group restictions button during mod edit
Browse files Browse the repository at this point in the history
If a mod doesn't support groups, then we remove the grouping element,
and now also the 'add group/group restriction' helper button too.
  • Loading branch information
snake committed Oct 10, 2018
1 parent 7daf207 commit 9477b1d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions course/moodleform_mod.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ function definition_after_data() {
if ($mform->elementExists('groupingid')) {
$mform->removeElement('groupingid');
}
// Nor does the group restrictions button.
if ($mform->elementExists('restrictgroupbutton')) {
$mform->removeElement('restrictgroupbutton');
}
}
}

Expand Down

0 comments on commit 9477b1d

Please sign in to comment.