Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

(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