Merge branch 'MDL-60812-master' of https://github.com/mwehr/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2018-01-22 16:33:07 +01:00
commit 3c2501ac77

View File

@ -123,9 +123,7 @@ class enrol_manual_enrol_users_form extends moodleform {
$roles = get_assignable_roles($context); $roles = get_assignable_roles($context);
$mform->addElement('select', 'roletoassign', get_string('assignrole', 'enrol_manual'), $roles); $mform->addElement('select', 'roletoassign', get_string('assignrole', 'enrol_manual'), $roles);
$keys = array_keys($roles); $mform->setDefault('roletoassign', $instance->roleid);
$defaultrole = end($keys);
$mform->setDefault('roletoassign', $defaultrole);
$mform->addAdvancedStatusElement('main'); $mform->addAdvancedStatusElement('main');