Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
Restore subplugin class. More...
Public Member Functions | |
define_subplugin_structure ($connectionpoint) | |
launch_after_execute_methods () | |
after_execute dispatcher for any restore_subplugin class | |
launch_after_restore_methods () | |
The after_restore dispatcher for any restore_subplugin class. | |
log ($message, $level, $a=null, $depth=null, $display=false) | |
Call the log function from the step. | |
process_ltiservice_gradebookservices_lineitem ($data) | |
Processes one lineitem. | |
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. | |
after_restore_lti () | |
We call the after_restore_lti to update the grade_items id's that we didn't know in the moment of creating the gradebookservices rows. | |
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_lti_subplugin_structure () | |
Returns the subplugin structure to attach to the XML 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. | |
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 |
restore_step | $step |
string | $subpluginname |
string | $subplugintype |
restore_task | $task |
Restore subplugin class.
Provides the necessary information needed to restore the lineitems related with the lti activity (coupled), and all the uncoupled ones from the course.
|
protected |
Returns the subplugin structure to attach to the XML element.
restore_path_element[] | array of elements to be processed on restore. |
|
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 ;-)
|
inherited |
after_execute dispatcher for any restore_subplugin 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 subplugin classes with multiple connection points will support multiple after_execute methods, one for each connection point
|
inherited |
The after_restore dispatcher for any restore_subplugin 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 subplugin classes with multiple connection points will support multiple after_restore methods, one for each connection point.
restore_ltiservice_gradebookservices_subplugin::process_ltiservice_gradebookservices_lineitem | ( | $data | ) |
Processes one lineitem.
mixed | $data |
void |
|
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