Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 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.

Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

Defines restore_final_task class

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: 204 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

restore_final_task:: (4 methods):
  build()
  launch_execute_after_restore()
  define_restore_log_rules()
  define_settings()


Class: restore_final_task  - X-Ref

Final task that provides all the final steps necessary in order to finish one
restore like gradebook, interlinks... apart from some final cleaning

TODO: Finish phpdocs
build()   X-Ref
Create all the steps that will be part of this task


launch_execute_after_restore()   X-Ref
Special method, only available in the restore_final_task, able to invoke the
restore_plan execute_after_restore() method, so restore_execute_after_restore step
will be able to launch all the after_restore() methods of the executed tasks


define_restore_log_rules()   X-Ref
Define the restore log rules that will be applied
by the {@link restore_logs_processor} when restoring
course logs. It must return one array
of {@link restore_log_rule} objects

Note these are course logs, but are defined and restored
in final task because we need all the activities to be
restored in order to handle some log records properly

define_settings()   X-Ref
Define the common setting that any restore type will have