Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403] [Versions 402 and 403]
Defines various backup steps that will be used by common tasks in backup
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: | 3100 lines (122 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
create_and_clean_temp_stuff:: (1 method):
define_execution()
drop_and_clean_temp_stuff:: (2 methods):
define_execution()
skip_cleaning_temp_dir()
create_taskbasepath_directory:: (1 method):
define_execution()
backup_activity_structure_step:: (4 methods):
prepare_activity_structure()
add_question_usages()
add_question_references()
add_question_set_references()
backup_questions_activity_structure_step:: (0 methods):
backup_calculate_question_categories:: (1 method):
define_execution()
backup_delete_temp_questions:: (1 method):
define_execution()
backup_block_structure_step:: (1 method):
prepare_block_structure()
backup_module_structure_step:: (1 method):
define_structure()
backup_section_structure_step:: (1 method):
define_structure()
backup_course_structure_step:: (1 method):
define_structure()
backup_enrolments_structure_step:: (2 methods):
execute_condition()
define_structure()
backup_roles_structure_step:: (1 method):
define_structure()
backup_final_roles_structure_step:: (1 method):
define_structure()
backup_final_scales_structure_step:: (1 method):
define_structure()
backup_final_outcomes_structure_step:: (1 method):
define_structure()
backup_filters_structure_step:: (1 method):
define_structure()
backup_comments_structure_step:: (1 method):
define_structure()
backup_badges_structure_step:: (2 methods):
execute_condition()
define_structure()
backup_calendarevents_structure_step:: (1 method):
define_structure()
backup_gradebook_structure_step:: (2 methods):
execute_condition()
define_structure()
backup_grade_history_structure_step:: (2 methods):
execute_condition()
define_structure()
backup_userscompletion_structure_step:: (2 methods):
execute_condition()
define_structure()
backup_groups_structure_step:: (3 methods):
define_structure()
get_group_custom_fields_for_backup()
get_grouping_custom_fields_for_backup()
backup_users_structure_step:: (1 method):
define_structure()
backup_block_instance_structure_step:: (1 method):
define_structure()
backup_course_logs_structure_step:: (1 method):
define_structure()
backup_activity_logs_structure_step:: (1 method):
define_structure()
backup_course_logstores_structure_step:: (1 method):
define_structure()
backup_course_loglastaccess_structure_step:: (1 method):
define_structure()
backup_activity_logstores_structure_step:: (0 methods):
backup_course_competencies_structure_step:: (2 methods):
define_structure()
execute_condition()
backup_activity_competencies_structure_step:: (2 methods):
define_structure()
execute_condition()
backup_inforef_structure_step:: (1 method):
define_structure()
move_inforef_annotations_to_final:: (1 method):
define_execution()
backup_final_files_structure_step:: (1 method):
define_structure()
backup_main_structure_step:: (1 method):
define_structure()
backup_zip_contents:: (2 methods):
define_execution()
progress()
backup_store_backup_file:: (1 method):
define_execution()
backup_activity_grade_items_to_ids:: (1 method):
define_execution()
backup_enrolments_execution_step:: (2 methods):
define_execution()
annotate_id()
backup_annotate_course_groups_and_groupings:: (1 method):
define_execution()
backup_annotate_groups_from_groupings:: (1 method):
define_execution()
backup_annotate_scales_from_outcomes:: (1 method):
define_execution()
backup_annotate_all_question_files:: (1 method):
define_execution()
backup_questions_structure_step:: (1 method):
define_structure()
backup_annotate_all_user_files:: (1 method):
define_execution()
backup_activity_grading_structure_step:: (2 methods):
execute_condition()
define_structure()
backup_activity_grades_structure_step:: (2 methods):
execute_condition()
define_structure()
backup_activity_grade_history_structure_step:: (2 methods):
execute_condition()
define_structure()
backup_course_completion_structure_step:: (2 methods):
execute_condition()
define_structure()
backup_completion_defaults_structure_step:: (2 methods):
execute_condition()
define_structure()
backup_contentbankcontent_structure_step:: (1 method):
define_structure()
backup_xapistate_structure_step:: (1 method):
define_structure()
Class: create_and_clean_temp_stuff - X-Ref
Create the temp dir where backup/restore will happen and create temp ids table.define_execution() X-Ref |
No description |
Class: drop_and_clean_temp_stuff - X-Ref
Delete the temp dir used by backup/restore (conditionally) and drop temp ids table.Class: create_taskbasepath_directory - X-Ref
Create the directory where all the task (activity/block...) information will be storeddefine_execution() X-Ref |
No description |
Class: backup_activity_structure_step - X-Ref
Abstract structure step, parent of all the activity structure steps. Used to wrap theprepare_activity_structure($activitystructure) X-Ref |
Wraps any activity backup structure within the common 'activity' element that will include common to all activities information like id, context... param: backup_nested_element $activitystructure the element to wrap return: backup_nested_element the $activitystructure wrapped by the common 'activity' element |
add_question_usages($element, $usageidname, $nameprefix = '') X-Ref |
Attach to $element (usually attempts) the needed backup structures for question_usages and all the associated data. param: backup_nested_element $element the element that will contain all the question_usages data. param: string $usageidname the name of the element that holds the usageid. param: string $nameprefix this prefix is added to all the element names we create. |
add_question_references($element, $component, $questionarea) X-Ref |
Backup the related data from reference table for the instance. param: backup_nested_element $element param: string $component param: string $questionarea |
add_question_set_references($element, $component, $questionarea) X-Ref |
Backup the related data from set_reference table for the instance. param: backup_nested_element $element param: string $component param: string $questionarea |
Class: backup_questions_activity_structure_step - X-Ref
Abstract structure step to help activities that store question attempt data, reference data and set reference data.Class: backup_calculate_question_categories - X-Ref
backup structure step in charge of calculating the categories to bedefine_execution() X-Ref |
No description |
Class: backup_delete_temp_questions - X-Ref
backup structure step in charge of deleting all the questions annotateddefine_execution() X-Ref |
No description |
Class: backup_block_structure_step - X-Ref
Abstract structure step, parent of all the block structure steps. Used to wrap theprepare_block_structure($blockstructure) X-Ref |
No description |
Class: backup_module_structure_step - X-Ref
structure step that will generate the module.xml file for the activity,define_structure() X-Ref |
No description |
Class: backup_section_structure_step - X-Ref
structure step that will generate the section.xml file for the sectiondefine_structure() X-Ref |
No description |
Class: backup_course_structure_step - X-Ref
structure step that will generate the course.xml file for the course, includingdefine_structure() X-Ref |
No description |
Class: backup_enrolments_structure_step - X-Ref
structure step that will generate the enrolments.xml file for the given courseexecute_condition() X-Ref |
Skip enrolments on the front page. return: bool |
define_structure() X-Ref |
No description |
Class: backup_roles_structure_step - X-Ref
structure step that will generate the roles.xml file for the given context, observingdefine_structure() X-Ref |
No description |
Class: backup_final_roles_structure_step - X-Ref
structure step that will generate the roles.xml containing thedefine_structure() X-Ref |
No description |
Class: backup_final_scales_structure_step - X-Ref
structure step that will generate the scales.xml containing thedefine_structure() X-Ref |
No description |
Class: backup_final_outcomes_structure_step - X-Ref
structure step that will generate the outcomes.xml containing thedefine_structure() X-Ref |
No description |
Class: backup_filters_structure_step - X-Ref
structure step in charge of constructing the filters.xml file for all the filters founddefine_structure() X-Ref |
No description |
Class: backup_comments_structure_step - X-Ref
Structure step in charge of constructing the comments.xml file for all the comments found in a given context.define_structure() X-Ref |
No description |
Class: backup_badges_structure_step - X-Ref
structure step in charge of constructing the badges.xml file for all the badges foundClass: backup_calendarevents_structure_step - X-Ref
structure step in charge of constructing the calender.xml file for all the events founddefine_structure() X-Ref |
No description |
Class: backup_gradebook_structure_step - X-Ref
structure step in charge of constructing the gradebook.xml file for all the gradebook config in the courseexecute_condition() X-Ref |
We need to decide conditionally, based on dynamic information about the execution of this step. Only will be executed if all the module gradeitems have been already included in backup |
define_structure() X-Ref |
No description |
Class: backup_grade_history_structure_step - X-Ref
Step in charge of constructing the grade_history.xml file containing the grade histories.execute_condition() X-Ref |
Limit the execution. This applies the same logic than the one applied to {@link backup_gradebook_structure_step}, because we do not want to save the history of items which are not backed up. At least for now. |
define_structure() X-Ref |
No description |
Class: backup_userscompletion_structure_step - X-Ref
structure step in charge if constructing the completion.xml file for all the users completionexecute_condition() X-Ref |
Skip completion on the front page. return: bool |
define_structure() X-Ref |
No description |
Class: backup_groups_structure_step - X-Ref
structure step in charge of constructing the main groups.xml file for all the groups anddefine_structure() X-Ref |
No description |
get_group_custom_fields_for_backup(int $courseid) X-Ref |
Get custom fields array for group param: int $courseid return: array |
get_grouping_custom_fields_for_backup(int $courseid) X-Ref |
Get custom fields array for grouping param: int $courseid return: array |
Class: backup_users_structure_step - X-Ref
structure step in charge of constructing the main users.xml file for all the users alreadydefine_structure() X-Ref |
No description |
Class: backup_block_instance_structure_step - X-Ref
structure step in charge of constructing the block.xml file for onedefine_structure() X-Ref |
No description |
Class: backup_course_logs_structure_step - X-Ref
define_structure() X-Ref |
No description |
Class: backup_activity_logs_structure_step - X-Ref
structure step in charge of constructing the logs.xml file for all the log records founddefine_structure() X-Ref |
No description |
Class: backup_course_logstores_structure_step - X-Ref
Structure step in charge of constructing the logstores.xml file for the course logs.define_structure() X-Ref |
No description |
Class: backup_course_loglastaccess_structure_step - X-Ref
Structure step in charge of constructing the loglastaccess.xml file for the course logs.define_structure() X-Ref |
This function creates the structures for the loglastaccess.xml file. Expected structure would look like this. <loglastaccesses> <loglastaccess id=2> <userid>5</userid> <timeaccess>1616887341</timeaccess> </loglastaccess> </loglastaccesses> return: backup_nested_element |
Class: backup_activity_logstores_structure_step - X-Ref
Structure step in charge of constructing the logstores.xml file for the activity logs.Class: backup_activity_competencies_structure_step - X-Ref
Activity competencies backup structure step.Class: backup_inforef_structure_step - X-Ref
structure in charge of constructing the inforef.xml file for all the items we wantdefine_structure() X-Ref |
No description |
Class: move_inforef_annotations_to_final - X-Ref
This step will get all the annotations already processed to inforef.xml file anddefine_execution() X-Ref |
No description |
Class: backup_final_files_structure_step - X-Ref
structure in charge of constructing the files.xml file with all thedefine_structure() X-Ref |
No description |
Class: backup_main_structure_step - X-Ref
Structure step in charge of creating the main moodle_backup.xml filedefine_structure() X-Ref |
No description |
Class: backup_zip_contents - X-Ref
Execution step that will generate the final zip (.mbz) file with all the contentsClass: backup_store_backup_file - X-Ref
This step will send the generated backup file to its final destinationdefine_execution() X-Ref |
No description |
Class: backup_activity_grade_items_to_ids - X-Ref
This step will search for all the activity (not calculations, categories nor aggregations) grade itemsdefine_execution() X-Ref |
No description |
Class: backup_enrolments_execution_step - X-Ref
This step allows enrol plugins to annotate custom fields.define_execution() X-Ref |
Function that will contain all the code to be executed. |
annotate_id($itemname, $itemid) X-Ref |
Annotate a single name/id pair. This can be called from {@link enrol_plugin::backup_annotate_custom_fields()}. param: string $itemname param: int $itemid |
Class: backup_annotate_course_groups_and_groupings - X-Ref
This step will annotate all the groups and groupings belonging to the coursedefine_execution() X-Ref |
No description |
Class: backup_annotate_groups_from_groupings - X-Ref
This step will annotate all the groups belonging to already annotated groupingsdefine_execution() X-Ref |
No description |
Class: backup_annotate_scales_from_outcomes - X-Ref
This step will annotate all the scales belonging to already annotated outcomesdefine_execution() X-Ref |
No description |
Class: backup_annotate_all_question_files - X-Ref
This step will generate all the file annotations for the alreadydefine_execution() X-Ref |
No description |
Class: backup_questions_structure_step - X-Ref
structure step in charge of constructing the questions.xml file for all thedefine_structure() X-Ref |
No description |
Class: backup_annotate_all_user_files - X-Ref
This step will generate all the file annotations for the alreadydefine_execution() X-Ref |
No description |
Class: backup_activity_grading_structure_step - X-Ref
Defines the backup step for advanced grading methods attached to the activity moduleexecute_condition() X-Ref |
Include the grading.xml only if the module supports advanced grading |
define_structure() X-Ref |
Declares the gradable areas structures and data sources |
Class: backup_activity_grades_structure_step - X-Ref
structure step in charge of constructing the grades.xml file for all the grade itemsexecute_condition() X-Ref |
No grades on the front page. return: bool |
define_structure() X-Ref |
No description |
Class: backup_activity_grade_history_structure_step - X-Ref
Structure step in charge of constructing the grade history of an activity.execute_condition() X-Ref |
No grades on the front page. return: bool |
define_structure() X-Ref |
No description |
Class: backup_course_completion_structure_step - X-Ref
Backups up the course completion information for the course.execute_condition() X-Ref |
No description |
define_structure() X-Ref |
The structure of the course completion backup return: backup_nested_element |
Class: backup_completion_defaults_structure_step - X-Ref
Backup completion defaults for each module type.execute_condition() X-Ref |
To conditionally decide if one step will be executed or no |
define_structure() X-Ref |
The structure of the course completion backup return: backup_nested_element |
Class: backup_contentbankcontent_structure_step - X-Ref
Structure step in charge of constructing the contentbank.xml file for all the contents found in a given contextdefine_structure() X-Ref |
Define structure for content bank step |
Class: backup_xapistate_structure_step - X-Ref
Structure step in charge of constructing the xapistate.xml file for all the xAPI states found in a given context.define_structure() X-Ref |
Define structure for content bank step |