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 39 and 311]

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: 206 lines (11 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