Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

(no description)

Copyright: 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 87 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

backup_optigroup:: (2 methods):
  add_child()
  process()


Class: backup_optigroup  - X-Ref

Instantiable class representing one optigroup element for conditional branching

Objects of this class are internally nested elements, so they support having both
final elements and children (more nested elements) and are able to have one source
and all the stuff supported by nested elements. Their main differences are:

- Support for conditional execution, using simple equality checks with outer values.
- Don't have representation in the hierarchy, so:
- Their level is the level of the parent of their enclosing optigroup.
- Act as one "path bridge" when looking for parent path values
- They don't support attributes

Their main use is to allow conditional branching, basically for optional submodules
like question types, assignment subtypes... where different subtrees of information
must be exported. It's correct to assume that each submodule will define its own
optigroup_element for backup purposes.
add_child($element)   X-Ref
No description

process($processor)   X-Ref
No description