mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-17081 allow role reset to self
The use case is importing of incomplete XML preset - keep current + preset changes. This also discards any pending changes.
This commit is contained in:
parent
8c6b980803
commit
4dd680c74e
@ -52,10 +52,7 @@ class core_role_preset_form extends moodleform {
|
||||
$group = get_string('role', 'core');
|
||||
$options[$group] = array();
|
||||
foreach (role_get_names(null, ROLENAME_BOTH) as $role) {
|
||||
if ($data['roleid'] == $role->id) {
|
||||
// Do not reset to self.
|
||||
continue;
|
||||
}
|
||||
// Allow reset to self too, it may be useful when importing incomplete XML preset.
|
||||
$options[$group][$role->id] = $role->localname;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user