diff --git a/admin/roles/classes/preset_form.php b/admin/roles/classes/preset_form.php index 79a775137f5c4..ff2024d7d9c11 100644 --- a/admin/roles/classes/preset_form.php +++ b/admin/roles/classes/preset_form.php @@ -52,10 +52,7 @@ protected function definition() { $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; }