MDL-60145 course: fix bug with group restictions button during mod edit
If a mod doesn't support groups, then we remove the grouping element, and now also the 'add group/group restriction' helper button too.
This commit is contained in:
@@ -290,6 +290,10 @@ abstract class moodleform_mod extends moodleform {
|
||||
if ($mform->elementExists('groupingid')) {
|
||||
$mform->removeElement('groupingid');
|
||||
}
|
||||
// Nor does the group restrictions button.
|
||||
if ($mform->elementExists('restrictgroupbutton')) {
|
||||
$mform->removeElement('restrictgroupbutton');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user