Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

New role XML processing.

Copyright: 2013 Petr Skoda {@link http://skodak.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 323 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_role_preset:: (8 methods):
  send_export_xml()
  get_export_xml()
  is_valid_preset()
  parse_preset()
  get_node()
  get_node_value()
  get_node_children()
  get_node_children_values()


Class: core_role_preset  - X-Ref

XML role file manipulation class.

send_export_xml($roleid)   X-Ref
Send role export xml file to browser.

param: int $roleid
return: void does not return, send the file to output

get_export_xml($roleid)   X-Ref
Generate role export xml file.

param: $roleid
return: string

is_valid_preset($xml)   X-Ref
Is this XML valid role preset?

param: string $xml
return: bool

parse_preset($xml)   X-Ref
Parse role preset xml file.

param: string $xml
return: array role info, null on error

get_node(DOMDocument $dom, $path)   X-Ref
No description

get_node_value(DOMDocument $dom, $path)   X-Ref
No description

get_node_children(DOMDocument $dom, $path, $tagname)   X-Ref
No description

get_node_children_values(DOMDocument $dom, $path, $tagname)   X-Ref
No description