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]

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