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.

Differences Between: [Versions 310 and 311] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

(no description)

File Size: 141 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

base_controller:: (7 methods):
  get_progress()
  set_progress()
  get_logger()
  add_logger()
  log()
  get_releasesession()
  set_copy()

instead:: (1 method):
  get_copy()


Class: base_controller  - X-Ref

Base class with shared stuff between backup controller and restore
controller.

get_progress()   X-Ref
Gets the progress reporter, which can be used to report progress within
the backup or restore process.

return: \core\progress\base Progress reporting object

set_progress(\core\progress\base $progress)   X-Ref
Sets the progress reporter.

param: \core\progress\base $progress Progress reporting object

get_logger()   X-Ref
Gets first logger in logging chain.

return: base_logger Logger

add_logger(base_logger $logger)   X-Ref
Inserts a new logger at end of logging chain.

param: base_logger $logger New logger to add

log($message, $level, $a = null, $depth = null, $display = false)   X-Ref
Logs data to the logger chain.


get_releasesession()   X-Ref
Returns the set value of releasesession.
This is used to indicate if the session should be closed during the backup/restore.

return: bool Indicates whether the session should be released.

set_copy(\stdClass $data)   X-Ref
Store extra data for course copy operations.

For a course copying these is data required to be passed to the restore step.
We store this data in its own section of the backup controller

param: \stdClass $data The course copy data.

Class: instead  - X-Ref

get_copy()   X-Ref
Get the course copy data.

return: \stdClass