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

Define all the restore steps that will be used by the restore_assign_activity_task

Copyright: 2012 NetSpot {@link http://www.netspot.com.au}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 432 lines (16 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class


Class: restore_assign_activity_structure_step  - X-Ref

Define the complete assignment structure for restore, with file and id annotations

define_structure()   X-Ref
Define the structure of the restore workflow.

return: restore_path_element $structure

process_assign($data)   X-Ref
Process an assign restore.

param: object $data The data in object form
return: void

process_assign_submission($data)   X-Ref
Process a submission restore

param: object $data The data in object form
return: void

process_assign_userflag($data)   X-Ref
Process a user_flags restore

param: object $data The data in object form
return: void

process_assign_grade($data)   X-Ref
Process a grade restore

param: object $data The data in object form
return: void

process_assign_plugin_config($data)   X-Ref
Process a plugin-config restore

param: object $data The data in object form
return: void

set_latest_submission_field()   X-Ref
For all submissions in this assignment, either set the
submission->latest field to 1 for the latest attempts
or create a new submission record for grades with no submission.

return: void

add_plugin_config_files($subtype)   X-Ref
Restore files from plugin configuration

param: string $subtype the plugin type to handle
return: void

process_assign_override($data)   X-Ref
Process a assign override restore

param: object $data The data in object form
return: void

after_execute()   X-Ref
Once the database tables have been fully restored, restore the files

return: void