Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are 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: 1 time
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