Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 402] [Versions 400 and 403]

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: 315 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.

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

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

return: string
param: $roleid

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

return: bool
param: string $xml

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

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

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