Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
|
Define all the restore steps. More...
Public Member Functions | |
after_restore_enrol () | |
This function is executed after all the tasks in the plan have been finished. | |
define_plugin_structure ($connectionpoint) | |
launch_after_execute_methods () | |
after_execute dispatcher for any restore_plugin class | |
launch_after_restore_methods () | |
after_restore dispatcher for any restore_plugin class | |
process_enrol_lti_tool ($data) | |
Processes LTI tools element data. | |
process_enrol_lti_users ($data) | |
Processes LTI users element data. | |
Static Public Member Functions | |
static | define_plugin_decode_contents () |
Define the contents in the plugin that must be processed by the link decoder. | |
static | get_restore_decode_contents ($plugintype) |
Returns one array with all the decode contents to be processed by the links decoder. | |
Protected Member Functions | |
add_related_files ($component, $filearea, $mappingitemname, $filesctxid=null, $olditemid=null) | |
Add all the existing file, given their component and filearea and one backup_ids itemname to match with. | |
apply_date_offset ($value) | |
Apply course startdate offset based in original course startdate and course_offset_startdate setting Note we are using one static cache here, but by restoreid, so it's ok for concurrence/multiple executions in the same request. | |
define_enrol_plugin_structure () | |
Declares the enrol LTI XML paths attached to the enrol element. | |
get_mapping ($itemname, $oldid) | |
Return the complete mapping from the given itemname, itemid. | |
get_mappingid ($itemname, $oldid, $ifnotfound=false) | |
Return the new id of a mapping for the given itemname. | |
get_namefor ($name='') | |
Simple helper function that returns the name for the restore_path_element It's not mandatory to use it but recommended ;-) | |
get_new_parentid ($itemname) | |
Returns the latest (parent) new id mapped by one pathelement. | |
get_old_parentid ($itemname) | |
Returns the latest (parent) old id mapped by one pathelement. | |
get_pathfor ($path='') | |
Simple helper function that returns the base (prefix) of the path for the restore_path_element Useful if we used get_recommended_name() in backup. | |
get_restoreid () | |
get_setting_value ($name) | |
Returns the value of one (task/plan) setting. | |
get_task () | |
Get the task we are part of. | |
set_mapping ($itemname, $oldid, $newid, $restorefiles=false, $filesctxid=null, $parentid=null) | |
To send ids pairs to backup_ids_table and to store them into paths. | |
Protected Attributes | |
restore_path_element | $connectionpoint |
string | $pluginname |
string | $plugintype |
restore_structure_step | $step |
restore_course_task restore_activity_task | $task |
array | $tools = array() |
$tools Stores the IDs of the newly created tools. | |
Define all the restore steps.
restore_enrol_lti_plugin::after_restore_enrol | ( | ) |
This function is executed after all the tasks in the plan have been finished.
This must be done here because the activities have not been restored yet.
|
protected |
Declares the enrol LTI XML paths attached to the enrol element.
array | of restore_path_element |
|
staticinherited |
Define the contents in the plugin that must be processed by the link decoder.
Reimplemented in restore_qtype_plugin.
|
protectedinherited |
Return the new id of a mapping for the given itemname.
string | $itemname | the type of item |
int | $oldid | the item ID from the backup |
mixed | $ifnotfound | what to return if $oldid wasnt found. Defaults to false |
|
protectedinherited |
Simple helper function that returns the base (prefix) of the path for the restore_path_element Useful if we used get_recommended_name() in backup.
It's not mandatory to use it but recommended ;-)
|
staticinherited |
Returns one array with all the decode contents to be processed by the links decoder.
This method, given one plugin type, returns one array of restore_decode_content objects that will be added to the restore decoder in order to perform modifications under the plugin contents.
The objects are retrieved by calling to the define_decode_contents method (when available), first in the main restore_xxxx_plugin class and later on each of the available subclasses
|
protectedinherited |
Get the task we are part of.
restore_activity_task|restore_course_task | the task. |
|
inherited |
after_execute dispatcher for any restore_plugin class
This method will dispatch execution to the corresponding after_execute_xxx() method when available, with xxx being the connection point of the instance, so plugin classes with multiple connection points will support multiple after_execute methods, one for each connection point
|
inherited |
after_restore dispatcher for any restore_plugin class
This method will dispatch execution to the corresponding after_restore_xxx() method when available, with xxx being the connection point of the instance, so plugin classes with multiple connection points will support multiple after_restore methods, one for each connection point
restore_enrol_lti_plugin::process_enrol_lti_tool | ( | $data | ) |
Processes LTI tools element data.
array | stdClass | $data |
restore_enrol_lti_plugin::process_enrol_lti_users | ( | $data | ) |
Processes LTI users element data.
array | stdClass | $data | The data to insert as a comment |
|
protectedinherited |
To send ids pairs to backup_ids_table and to store them into paths.
This method will send the given itemname and old/new ids to the backup_ids_temp table, and, at the same time, will save the new id into the corresponding restore_path_element for easier access by children. Also will inject the known old context id for the task in case it's going to be used for restoring files later