mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-59365 enrol: Make select users first
This is the most important element in the form - make it first.
This commit is contained in:
parent
0fa35b1abc
commit
aa8909f479
@ -94,12 +94,6 @@ class enrol_manual_enrol_users_form extends moodleform {
|
||||
$basemenu[4] = get_string('now', 'enrol_manual') . ' (' . userdate($now, get_string('strftimedatetimeshort')) . ')';
|
||||
|
||||
$mform->addElement('header', 'main', get_string('enrolmentoptions', 'enrol'));
|
||||
$roles = get_assignable_roles($context);
|
||||
$mform->addElement('select', 'role', get_string('assignrole', 'enrol_manual'), $roles);
|
||||
$keys = array_keys($roles);
|
||||
$defaultrole = end($keys);
|
||||
$mform->setDefault('role', $defaultrole);
|
||||
|
||||
$options = array(
|
||||
'ajax' => 'enrol_manual/form-potential-user-selector',
|
||||
'multiple' => true,
|
||||
@ -111,6 +105,12 @@ class enrol_manual_enrol_users_form extends moodleform {
|
||||
$options = ['contextid' => $context->id, 'multiple' => true];
|
||||
$mform->addElement('cohort', 'cohortlist', get_string('selectcohorts', 'enrol_manual'), $options);
|
||||
|
||||
$roles = get_assignable_roles($context);
|
||||
$mform->addElement('select', 'role', get_string('assignrole', 'enrol_manual'), $roles);
|
||||
$keys = array_keys($roles);
|
||||
$defaultrole = end($keys);
|
||||
$mform->setDefault('role', $defaultrole);
|
||||
|
||||
$mform->addAdvancedStatusElement('main');
|
||||
|
||||
$mform->addElement('checkbox', 'recovergrades', get_string('recovergrades', 'enrol'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user