mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-60812 enrol_manual: Fixes not working default role
This commit is contained in:
parent
f5b956679e
commit
122c999536
@ -123,9 +123,7 @@ class enrol_manual_enrol_users_form extends moodleform {
|
||||
|
||||
$roles = get_assignable_roles($context);
|
||||
$mform->addElement('select', 'roletoassign', get_string('assignrole', 'enrol_manual'), $roles);
|
||||
$keys = array_keys($roles);
|
||||
$defaultrole = end($keys);
|
||||
$mform->setDefault('roletoassign', $defaultrole);
|
||||
$mform->setDefault('roletoassign', $instance->roleid);
|
||||
|
||||
$mform->addAdvancedStatusElement('main');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user