1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-25 10:26:17 +02:00

Merge branch 'w26_MDL-17081_m26_roles2' of git://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2013-06-25 16:28:22 +02:00
commit 74618f31d2
2 changed files with 4 additions and 11 deletions

@ -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;
}

@ -15,12 +15,6 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="name">
<xs:complexType/>
</xs:element>
<xs:element name="description">
<xs:complexType/>
</xs:element>
<xs:element name="archetype" type="xs:string"/>
<xs:element name="contextlevels">
<xs:complexType>
@ -61,9 +55,11 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="shortname" type="xs:string"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
<xs:element name="inherit" type="xs:string"/>
<xs:element name="allow" type="xs:string"/>
<xs:element name="prevent" type="xs:string"/>
<xs:element name="prohibit" type="xs:string"/>
<xs:element name="shortname" type="xs:string"/>
</xs:schema>