mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
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:
parent
129783b98c
commit
de60737dd7
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user