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.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 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