mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-22033 groupings now enabled unconditionally, groupmembersonly kept as experimental - this simplifies groups code logic a bit, user interface changes should not be significant because the groupings are not visible much until at least one created; hopefully the new description of groupmembersonly will have to preventsome gradebook complaints
This commit is contained in:
parent
e8c2189d78
commit
98da60215e
31 changed files with 137 additions and 214 deletions
|
@ -55,23 +55,21 @@ class autogroup_form extends moodleform {
|
|||
$mform->setDefault('namingscheme', $template);
|
||||
}
|
||||
|
||||
if (!empty($CFG->enablegroupings)) {
|
||||
$options = array('0' => get_string('no'),
|
||||
'-1'=> get_string('newgrouping', 'group'));
|
||||
if ($groupings = groups_get_all_groupings($COURSE->id)) {
|
||||
foreach ($groupings as $grouping) {
|
||||
$options[$grouping->id] = strip_tags(format_string($grouping->name));
|
||||
}
|
||||
$options = array('0' => get_string('no'),
|
||||
'-1'=> get_string('newgrouping', 'group'));
|
||||
if ($groupings = groups_get_all_groupings($COURSE->id)) {
|
||||
foreach ($groupings as $grouping) {
|
||||
$options[$grouping->id] = strip_tags(format_string($grouping->name));
|
||||
}
|
||||
$mform->addElement('select', 'grouping', get_string('createingrouping', 'group'), $options);
|
||||
if ($groupings) {
|
||||
$mform->setDefault('grouping', '-1');
|
||||
}
|
||||
|
||||
$mform->addElement('text', 'groupingname', get_string('groupingname', 'group'), $options);
|
||||
$mform->setType('groupingname', PARAM_MULTILANG);
|
||||
$mform->disabledIf('groupingname', 'grouping', 'noteq', '-1');
|
||||
}
|
||||
$mform->addElement('select', 'grouping', get_string('createingrouping', 'group'), $options);
|
||||
if ($groupings) {
|
||||
$mform->setDefault('grouping', '-1');
|
||||
}
|
||||
|
||||
$mform->addElement('text', 'groupingname', get_string('groupingname', 'group'), $options);
|
||||
$mform->setType('groupingname', PARAM_MULTILANG);
|
||||
$mform->disabledIf('groupingname', 'grouping', 'noteq', '-1');
|
||||
|
||||
$mform->addElement('hidden','courseid');
|
||||
$mform->setType('courseid', PARAM_INT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue