Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

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

(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: 159 lines (5 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 2 classes


Class: restore_task  - X-Ref

Abstract class defining the needed stuf for one restore task (a collection of steps)

TODO: Finish phpdocs
__construct($name, $plan = null)   X-Ref
Constructor - instantiates one object of this class


get_restoreid()   X-Ref
No description

get_info()   X-Ref
No description

get_target()   X-Ref
No description

get_userid()   X-Ref
No description

get_decoder()   X-Ref
No description

is_samesite()   X-Ref
No description

is_missing_modules()   X-Ref
No description

is_excluding_activities()   X-Ref
No description

set_preloaded_information()   X-Ref
No description

get_preloaded_information()   X-Ref
No description

get_tempdir()   X-Ref
No description

get_old_courseid()   X-Ref
No description

get_old_contextid()   X-Ref
No description

get_old_system_contextid()   X-Ref
No description

get_comment_mapping_itemname($commentarea)   X-Ref
Given a commment area, return the itemname that contains the itemid mappings

By default, both are the same (commentarea = itemname), so return it. If some
plugins use a different approach, this method can be overriden in its task.

param: string $commentarea area defined for this comment
return: string itemname that contains the related itemid mapping

execute_after_restore()   X-Ref
If the task has been executed, launch its after_restore()
method if available


backup_version_compare(int $version, string $operator)   X-Ref
Compares the provided moodle version with the one the backup was taken from.

param: int $version Moodle version number (YYYYMMDD or YYYYMMDDXX)
param: string $operator Operator to compare the provided version to the backup version. {@see version_compare()}
return: bool True if the comparison passes.

backup_release_compare(string $release, string $operator)   X-Ref
Compares the provided moodle release with the one the backup was taken from.

param: string $release Moodle release (X.Y or X.Y.Z)
param: string $operator Operator to compare the provided release to the backup release. {@see version_compare()}
return: bool True if the comparison passes.

Class: restore_task_exception  - X-Ref

__construct($errorcode, $a=NULL, $debuginfo=null)   X-Ref
No description