Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Abstract class defining the needed stuff to execute code on restore. More...
Public Member Functions | |
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. More... | |
decrypt ($value) | |
Returns symmetric-key AES-256 decryption of base64 encoded contents. More... | |
destroy () | |
Destroy all circular references. More... | |
execute () | |
This function will perform all the actions necessary to achieve the execution of the plan/part/task. More... | |
get_name () | |
log ($message, $level, $a=null, $depth=null, $display=false) | |
This function will be responsible for handling the params, and to call to the corresponding logger->process() once all modifications in params have been performed. More... | |
set_task ($task) | |
Protected Member Functions | |
define_execution () | |
Function that will contain all the code to be executed. More... | |
get_basepath () | |
get_courseid () | |
get_logger () | |
get_restoreid () | |
get_setting ($name) | |
get_setting_value ($name) | |
get_settings () | |
Protected API starts here. | |
setting_exists ($name) | |
Protected Attributes | |
$name | |
$task | |
Abstract class defining the needed stuff to execute code on restore.
TODO: Finish phpdocs
|
inherited |
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.
Note: The policy is to roll date only for configurations and not for user data. see MDL-9367.
int | $value | Time value (seconds since epoch), or empty for nothing |
int | Time value after applying the date offset, or empty for nothing |
|
inherited |
Returns symmetric-key AES-256 decryption of base64 encoded contents.
This method is used in restore operations to decrypt contents encrypted with encrypted_final_element automatically decoding (base64) and decrypting contents using the key stored in backup_encryptkey config.
Requires openssl, cipher availability, and key existence (backup automatically sets it if missing). Integrity is provided via HMAC.
string | $value | encrypted_final_element value to decode and decrypt. |
string|null | decoded and decrypted value or null if the operation can not be performed. |
|
abstractprotected |
Function that will contain all the code to be executed.
Reimplemented in restore_create_and_clean_temp_stuff, restore_drop_and_clean_temp_stuff, restore_decode_interlinks, restore_rebuild_course_cache, restore_execute_after_restore, restore_review_pending_block_positions, restore_update_availability, restore_process_course_modules_availability, restore_load_included_inforef_records, restore_load_and_map_roles, restore_load_included_users, restore_process_included_users, restore_create_included_users, restore_load_categories_and_questions, restore_process_categories_and_questions, restore_course_legacy_files_step, restore_default_enrolments_step, restore_fix_restorer_access_step, restore_move_module_questions_categories, restore_create_question_files, restore_process_file_aliases_queue, restore_course_search_index, restore_activity_search_index, restore_block_search_index, and restore_calendar_action_events.
|
inherited |
Destroy all circular references.
It helps PHP 5.2 a lot!
restore_execution_step::execute | ( | ) |
This function will perform all the actions necessary to achieve the execution of the plan/part/task.
Implements executable.
|
inherited |
This function will be responsible for handling the params, and to call to the corresponding logger->process() once all modifications in params have been performed.
Implements loggable.