Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Files | Namespaces | Classes | Functions | Variables
core_backup

Files

file  backup_activity_task.class.php
 Defines backup_activity_task class.
 
file  backup_block_task.class.php
 @subpackage moodle2
 
file  backup_course_task.class.php
 Defines backup_course_task.
 
file  backup_coursereport_plugin.class.php
 Base class for course report backup plugins.
 
file  backup_custom_fields.php
 Defines various element classes used in specific areas.
 
file  backup_default_block_task.class.php
 Defines backup_default_block_task class.
 
file  backup_enrol_plugin.class.php
 Defines backup_enrol_plugin class.
 
file  backup_final_task.class.php
 Defines backup_final_task class.
 
file  backup_format_plugin.class.php
 Defines backup_format_plugin class.
 
file  backup_gradingform_plugin.class.php
 Contains class backup_gradingform_plugin responsible for advanced grading form plugin backup.
 
file  backup_local_plugin.class.php
 Defines backup_local_plugin class.
 
file  backup_moodleform.class.php
 This file contains the generic moodleform bridge for the backup user interface as well as the individual forms that relate to the different stages the user interface can exist within.
 
file  backup_plagiarism_plugin.class.php
 Defines backup_plagiarism_plugin class.
 
file  backup_plan_builder.class.php
 Defines backup_plan_builder class.
 
file  backup_plugin.class.php
 Defines backup_plugin class.
 
file  backup_qtype_extrafields_plugin.class.php
 Defines backup_qtype_extrafields_plugin class.
 
file  backup_qtype_plugin.class.php
 Defines backup_qtype_plugin class.
 
file  backup_report_plugin.class.php
 Base class for report backup plugins.
 
file  backup_root_task.class.php
 Defines backup_root_task class.
 
file  backup_section_task.class.php
 Defines backup_section_task class.
 
file  backup_setting.class.php
 Defines backup_setting class.
 
file  backup_settingslib.php
 Defines classes used to handle backup settings.
 
file  backup_stepslib.php
 Defines various backup steps that will be used by common tasks in backup.
 
file  backup_subplugin.class.php
 Defines backup_subplugin class.
 
file  backup_theme_plugin.class.php
 Defines backup_theme_plugin class.
 
file  backup_tool_plugin.class.php
 Admin tool backup plugin base.
 
file  backup_ui.class.php
 This file contains the backup user interface class.
 
file  backup_ui_setting.class.php
 This file contains the setting user interface classes that all backup/restore settings use to represent the UI they have.
 
file  backup_ui_stage.class.php
 Backup user interface stages.
 
file  backup_xml_transformer.class.php
 Defines backup_xml_transformer class.
 
file  base_controller.class.php
 Base class with shared stuff between backup controller and restore controller.
 
file  base_moodleform.class.php
 This file contains the generic moodleform bridge for the backup user interface as well as the individual forms that relate to the different stages the user interface can exist within.
 
file  base_ui.class.php
 This file contains the backup user interface class.
 
file  base_ui_stage.class.php
 Backup user interface stages.
 
file  behat_backup.php
 Backup and restore actions to help behat feature files writting.
 
file  copy.php
 Course copy class.
 
file  copy_form.php
 Course copy form class.
 
file  core_backup_html_logger.class.php
 Logger that stores HTML log data in memory, ready for later display.
 
file  externallib.php
 External backup API.
 
file  import_extensions.php
 This file contains extension of the backup classes that override some methods and functionality in order to customise the backup UI for the purposes of import.
 
file  provider.php
 Privacy Subsystem implementation for core_backup.
 
file  renderer.php
 This file contains backup and restore output renderers.
 
file  restore_activity_task.class.php
 Defines restore_activity_task class.
 
file  restore_block_task.class.php
 Defines restore_block_task class.
 
file  restore_course_task.class.php
 Defines restore_course_task class.
 
file  restore_coursereport_plugin.class.php
 Restore for course plugin: course report.
 
file  restore_default_block_task.class.php
 Defines restore_default_block_task class.
 
file  restore_enrol_plugin.class.php
 Defines restore_enrol_plugin class.
 
file  restore_final_task.class.php
 Defines restore_final_task class.
 
file  restore_format_plugin.class.php
 Defines restore_format_plugin class.
 
file  restore_gradingform_plugin.class.php
 Contains class restore_gradingform_plugin responsible for advanced grading form plugin backup.
 
file  restore_local_plugin.class.php
 Defines restore_local_plugin class.
 
file  restore_moodleform.class.php
 This file contains the forms used by the restore stages.
 
file  restore_plagiarism_plugin.class.php
 Defines restore_plagiarism_plugin class.
 
file  restore_plan_builder.class.php
 Defines restore_plan_builder class.
 
file  restore_plugin.class.php
 Defines restore_plugin class.
 
file  restore_qtype_extrafields_plugin.class.php
 Defines restore_qtype_extrafields_plugin class.
 
file  restore_qtype_plugin.class.php
 Defines restore_qtype_plugin class.
 
file  restore_report_plugin.class.php
 Restore for plugin report.
 
file  restore_root_task.class.php
 Defines restore_root_task class.
 
file  restore_section_task.class.php
 Defines restore_section_task class.
 
file  restore_settingslib.php
 Defines classes used to handle restore settings.
 
file  restore_stepslib.php
 Defines various restore steps that will be used by common tasks in restore.
 
file  restore_subplugin.class.php
 Defines restore_subplugin class.
 
file  restore_theme_plugin.class.php
 Restore for course plugin: theme.
 
file  restore_tool_plugin.class.php
 Admin tool restore plugin base.
 
file  restore_ui.class.php
 This file contains the restore user interface class.
 
file  restore_ui_components.php
 This file contains components used by the restore UI.
 
file  restore_ui_stage.class.php
 restore user interface stages
 
file  root_backup_setting.class.php
 Defines root_backup_setting class.
 

Namespaces

namespace  core_backup\copy
  
 
namespace  core_backup\output
  
 
namespace  core_backup\privacy
  
 

Classes

class  anonymizer_final_element
 Implementation of backup_final_element that provides one interceptor for anonymization of data. More...
 
class  backup_activities_setting
 root setting to control if backup will include activities or no. More...
 
class  backup_activity_generic_setting
 generic activity setting to pass various settings between tasks and steps More...
 
class  backup_activity_included_setting
 activity backup setting to control if activity will be included or no, depends of @backup_activities_setting and optionally parent section included setting More...
 
class  backup_activity_structure_step
 Abstract structure step, parent of all the activity structure steps. More...
 
class  backup_activity_task
 Provides all the settings and steps to perform one complete backup of the activity. More...
 
class  backup_activity_userinfo_setting
 activity backup setting to control if activity will include user information or no, depends of @backup_users_setting More...
 
class  backup_anonymize_setting
 root setting to control if backup will generate anonymized user info or no, depends of @backup_users_setting so only is available if the former is enabled (apart from security that can change it More...
 
class  backup_badges_setting
 root setting to control if backup will include badges or not, depends on @backup_activities_setting More...
 
class  backup_block_task
 abstract block task that provides all the properties and common steps to be performed when one block is being backup More...
 
class  backup_calendarevents_setting
 root setting to control if backup will include calender events or no (any level), depends of @backup_users_setting exactly in the same way than @backup_anonymize_setting so we extend from it More...
 
class  backup_comments_setting
 root setting to control if backup will include comments or no (any level), depends of @backup_users_setting exactly in the same way than @backup_anonymize_setting so we extend from it More...
 
class  backup_competencies_setting
 root setting to control if backup will include competencies or not. More...
 
class  backup_confirmation_form
 Confirmation backup user interface stage moodleform. More...
 
class  backup_contentbankcontent_setting
 Root setting to control if backup will include content bank content or no. More...
 
class  backup_course_task
 course task that provides all the properties and common steps to be performed when one course is being backup More...
 
class  backup_coursereport_plugin
 
class  backup_customfield_setting
 root setting to control if backup will include custom field information More...
 
class  backup_default_block_task
 Default block task to backup blocks that haven't own DB structures to be added when one block is being backup. More...
 
class  backup_enrol_plugin
 Base class for enrol backup plugins. More...
 
class  backup_filename_setting
 root setting to handle backup file names (no dependencies nor anything else) More...
 
class  backup_files_viewer
 Data structure representing backup files viewer. More...
 
class  backup_final_task
 Final task that provides all the final steps necessary in order to finish one backup (mainly gathering references and creating the main xml) apart from some final cleaning. More...
 
class  backup_format_plugin
 Class extending standard backup_plugin in order to implement some helper methods related with the course formats (format plugin) More...
 
class  backup_generic_setting
 root generic setting to store different things without dependencies More...
 
class  backup_gradingform_plugin
 
class  backup_groups_setting
 root setting to control if backup will include group information depends on @backup_users_setting More...
 
class  backup_initial_form
 Initial backup user interface stage moodleform. More...
 
class  backup_local_plugin
 Class extending standard backup_plugin in order to implement some helper methods related with the local plugins. More...
 
class  backup_logs_setting
 root setting to control if backup will include logs or no (any level), depends of @backup_users_setting exactly in the same way than @backup_anonymize_setting so we extend from it More...
 
class  backup_moodleform
 Backup moodleform bridge. More...
 
class  backup_plagiarism_plugin
 Class extending standard backup_plugin in order to implement some helper methods related with the plagiarism plugins (plagiarism plugin) More...
 
class  backup_plan_builder
 Abstract class defining the static method in charge of building the whole backup plan, based in @backup_controller preferences. More...
 
class  backup_plugin
 Class implementing the plugins support for moodle2 backups. More...
 
class  backup_plugin_element
 Implementation of backup_optigroup_element to be used by plugins stuff. More...
 
class  backup_qtype_extrafields_plugin
 Class extending backup_qtype_plugin in order to use extra fields method. More...
 
class  backup_qtype_plugin
 Class extending standard backup_plugin in order to implement some helper methods related with the questions (qtype plugin) More...
 
class  backup_report_plugin
 
class  backup_role_assignments_setting
 root setting to control if backup will include role assignments or no (any level), depends of @backup_users_setting exactly in the same way than @backup_anonymize_setting so we extend from it More...
 
class  backup_root_task
 Start task that provides all the settings common to all backups and some initialization steps. More...
 
class  backup_schema_form
 Schema backup user interface stage moodleform. More...
 
class  backup_section_generic_setting
 generic section setting to pass various settings between tasks and steps More...
 
class  backup_section_included_setting
 Setting to define if one section is included or no. More...
 
class  backup_section_task
 section task that provides all the properties and common steps to be performed when one section is being backup More...
 
class  backup_section_userinfo_setting
 section backup setting to control if section will include user information or no, depends of @backup_users_setting More...
 
class  backup_setting
 Parent class for all backup settings. More...
 
class  backup_setting_exception
 Exception class used by all the @backup_setting stuff. More...
 
class  backup_setting_ui
 Abstract class to represent the user interface backup settings have. More...
 
class  backup_setting_ui_checkbox
 A checkbox user interface element for backup settings (default) More...
 
class  backup_setting_ui_dateselector
 A date selector user interface widget for backup settings. More...
 
class  backup_setting_ui_defaultcustom
 A wrapper for defaultcustom form element - can have either text or date_selector type. More...
 
class  backup_setting_ui_exception
 Backup setting UI exception class. More...
 
class  backup_setting_ui_radio
 Radio button user interface element for backup settings. More...
 
class  backup_setting_ui_select
 A select box, drop down user interface for backup settings. More...
 
class  backup_setting_ui_text
 A text input user interface element for backup settings. More...
 
class  backup_subplugin
 Class implementing the subplugins support for moodle2 backups. More...
 
class  backup_subplugin_element
 Implementation of backup_optigroup_element to be used by subplugins stuff. More...
 
class  backup_theme_plugin
 Base class for theme backup plugins. More...
 
class  backup_tool_plugin
 Admin tool backup plugin base class. More...
 
class  backup_ui
 This is the backup user interface class. More...
 
class  backup_ui_exception
 Backup user interface exception. More...
 
class  backup_ui_stage
 Abstract stage class. More...
 
class  backup_ui_stage_complete
 The completed backup stage. More...
 
class  backup_ui_stage_confirmation
 Confirmation stage. More...
 
class  backup_ui_stage_final
 Final stage of backup. More...
 
class  backup_ui_stage_initial
 Class representing the initial stage of a backup. More...
 
class  backup_ui_stage_schema
 Schema stage of backup process. More...
 
class  backup_users_setting
 root setting to control if backup will include user information A lot of other settings are dependent of this (module's user info, grades user info, messages, blogs... More...
 
class  backup_userscompletion_setting
 root setting to control if backup will include users completion data or no (any level), depends of @backup_users_setting exactly in the same way than @backup_anonymize_setting so we extend from it More...
 
class  backup_xml_transformer
 Class implementing the @xml_contenttransformed logic to be applied in moodle2 backups. More...
 
class  base64_encode_final_element
 Implementation of backup_final_element that provides base64 encoding. More...
 
class  base_controller
 
class  base_moodleform
 Base moodleform bridge. More...
 
class  base_setting_ui
 Abstract class used to represent the user interface that a setting has. More...
 
class  base_setting_ui_exception
 Base setting UI exception class. More...
 
class  base_ui
 This is the backup user interface class. More...
 
class  base_ui_exception
 Backup user interface exception. More...
 
class  base_ui_stage
 Abstract stage class. More...
 
class  behat_backup
 
class  core_backup\copy\copy
 Course copy class. More...
 
class  core_backup\output\copy_form
 Course copy form class. More...
 
class  core_backup\privacy\provider
 Privacy Subsystem implementation for core_backup. More...
 
class  core_backup_external
 
class  core_backup_html_logger
 
class  core_backup_renderer
 The primary renderer for the backup. More...
 
class  create_and_clean_temp_stuff
 Create the temp dir where backup/restore will happen and create temp ids table. More...
 
class  create_taskbasepath_directory
 Create the directory where all the task (activity/block...) information will be stored. More...
 
class  drop_and_clean_temp_stuff
 Delete the temp dir used by backup/restore (conditionally), delete old directories and drop temp ids table. More...
 
class  encrypted_final_element
 Implementation of backup_final_element that provides symmetric-key AES-256 encryption of contents. More...
 
class  file_nested_element
 Implementation of backup_nested_element that provides special handling of files. More...
 
class  import_course_search
 Extends the restore course search to search for import courses. More...
 
class  import_ui
 Import UI class. More...
 
class  import_ui_stage_confirmation
 Extends the confirmation stage. More...
 
class  import_ui_stage_final
 Overrides the final stage. More...
 
class  import_ui_stage_inital
 Extends the initial stage. More...
 
class  import_ui_stage_precheck
 Class representing the precheck/selection stage of a import. More...
 
class  import_ui_stage_schema
 Extends the schema stage. More...
 
class  mnethosturl_final_element
 Implementation of backup_final_element that provides special handling of mnethosturl. More...
 
class  restore_activities_setting
 root setting to control if restore will create activities A lot of other settings (_included at activity levels) are dependent of this setting More...
 
class  restore_activity_competencies_structure_step
 Restore activity competencies structure step. More...
 
class  restore_activity_generic_setting
 generic activity setting to pass various settings between tasks and steps More...
 
class  restore_activity_grade_history_structure_step
 Step in charge of restoring the grade history of an activity. More...
 
class  restore_activity_grades_structure_step
 This structure step restores the grade items associated with one activity All the grade items are made child of the "course" grade item but the original categoryid is saved as parentitemid in the backup_ids table, so, when restoring the complete gradebook (categories and calculations), that information is available there. More...
 
class  restore_activity_grading_structure_step
 Defines the restore step for advanced grading methods attached to the activity module. More...
 
class  restore_activity_included_setting
 activity backup setting to control if activity will be included or no, depends of @restore_activities_setting and optionally parent section included setting More...
 
class  restore_activity_logs_structure_step
 This structure step restores activity logs, extending restore_course_logs_structure_step sharing its same structure but modifying the way records are handled. More...
 
class  restore_activity_logstores_structure_step
 Structure step in charge of restoring the logstores.xml file for the activity logs. More...
 
class  restore_activity_search_index
 Index activity after restore (when not restoring whole course). More...
 
class  restore_activity_structure_step
 Abstract structure step, parent of all the activity structure steps. More...
 
class  restore_activity_task
 abstract activity task that provides all the properties and common tasks to be performed when one activity is being restored More...
 
class  restore_activity_userinfo_setting
 activity backup setting to control if activity will include user information or no, depends of @restore_users_setting More...
 
class  restore_badges_setting
 root setting to control if restore will create badges or not, depends on @restore_activities_setting More...
 
class  restore_badges_structure_step
 This structure steps restores the badges and their configs. More...
 
class  restore_block_instance_structure_step
 This structure steps restores one instance + positions of one block Note: Positions corresponding to one existing context are restored here, but all the ones having unknown contexts are sent to backup_ids for a later chance to be restored at the end (final task) More...
 
class  restore_block_search_index
 Index block after restore (when not restoring whole course). More...
 
class  restore_block_task
 abstract block task that provides all the properties and common steps to be performed when one block is being restored More...
 
class  restore_calendar_action_events
 Restore action events. More...
 
class  restore_calendarevents_setting
 root setting to control if restore will create events or no, depends of @restore_users_setting exactly in the same way than @restore_role_assignments_setting so we extend from it More...
 
class  restore_calendarevents_structure_step
 This structure steps restores the calendar events. More...
 
class  restore_category_search
 A category search component. More...
 
class  restore_comments_setting
 root setting to control if restore will create comments or no, depends of @restore_users_setting exactly in the same way than @restore_role_assignments_setting so we extend from it More...
 
class  restore_comments_structure_step
 This structure steps restores the comments Note: Cannot use the comments API because defaults to USER->id. More...
 
class  restore_competencies_setting
 root setting to control if competencies will also be restored. More...
 
class  restore_completion_defaults_structure_step
 Restore completion defaults for each module type. More...
 
class  restore_contentbankcontent_setting
 root setting to control if restore will create content bank content or no More...
 
class  restore_contentbankcontent_structure_step
 This structure steps restores the content bank content. More...
 
class  restore_course_competencies_structure_step
 Restore course competencies structure step. More...
 
class  restore_course_completion_structure_step
 
class  restore_course_defaultcustom_setting
 Setting to switch between current and new course name/startdate. More...
 
class  restore_course_generic_setting
 generic course setting to pass various settings between tasks and steps More...
 
class  restore_course_generic_text_setting
 
class  restore_course_legacy_files_step
 Execution step that will migrate legacy files if present. More...
 
class  restore_course_logs_structure_step
 This structure step restores course logs (cmid = 0), delegating the hard work to the corresponding restore_logs_processor passing the collection of restore_log_rule rules to be observed as they are defined by the task. More...
 
class  restore_course_logstores_structure_step
 Structure step in charge of restoring the logstores.xml file for the course logs. More...
 
class  restore_course_overwrite_conf_setting
 Setting to define is we are going to overwrite course configuration. More...
 
class  restore_course_search
 A course search component. More...
 
class  restore_course_search_index
 Index course after restore. More...
 
class  restore_course_structure_step
 Structure step that will read the course.xml file, loading it and performing various actions depending of the site/restore settings. More...
 
class  restore_course_task
 course task that provides all the properties and common steps to be performed when one course is being restored More...
 
class  restore_coursereport_plugin
 
class  restore_create_and_clean_temp_stuff
 delete old directories and conditionally create backup_temp_ids table More...
 
class  restore_create_categories_and_questions
 Structure step in charge of creating/mapping all the qcats and qs by parsing the questions.xml file and checking it against the results calculated by restore_process_categories_and_questions and stored in backup_ids_temp. More...
 
class  restore_create_included_users
 Execution step that will create all the needed users as calculated by @restore_process_included_users (those having newiteind = 0) More...
 
class  restore_create_question_files
 Execution step that will create all the question/answers/qtype-specific files for the restored questions. More...
 
class  restore_customfield_setting
 root setting to control if restore will include custom field information More...
 
class  restore_decode_interlinks
 decode all the interlinks present in restored content relying 100% in the restore_decode_processor that handles both the contents to modify and the rules to be applied More...
 
class  restore_default_block_task
 Default block task to restore blocks not having own DB structures to be added. More...
 
class  restore_default_enrolments_step
 If no instances yet add default enrol methods the same way as when creating new course in UI. More...
 
class  restore_drop_and_clean_temp_stuff
 delete the temp dir used by backup/restore (conditionally), delete old directories and drop temp ids table More...
 
class  restore_enrol_plugin
 Base class for enrol backup plugins. More...
 
class  restore_enrolments_structure_step
 This structure steps restores the enrol plugins and their underlying enrolments, performing all the mappings and/or movements required. More...
 
class  restore_execute_after_restore
 Review all the tasks having one after_restore method executing it to perform some final adjustments of information not available when the task was executed. More...
 
class  restore_filters_structure_step
 This structure steps restores the filters and their configs. More...
 
class  restore_final_task
 Final task that provides all the final steps necessary in order to finish one restore like gradebook, interlinks... apart from some final cleaning. More...
 
class  restore_fix_restorer_access_step
 Make sure the user restoring the course can actually access it. More...
 
class  restore_format_plugin
 Class extending standard restore_plugin in order to implement some helper methods related with the course formats (format plugin) More...
 
class  restore_generic_setting
 root generic setting to store different things without dependencies More...
 
class  restore_grade_histories_setting
 root setting to control if restore will create grade_histories or no, depends of @restore_users_setting exactly in the same way than @restore_role_assignments_setting so we extend from it More...
 
class  restore_grade_history_structure_step
 Step in charge of restoring the grade history of a course. More...
 
class  restore_gradebook_structure_step
 Restore calculated grade items, grade categories etc. More...
 
class  restore_gradingform_plugin
 
class  restore_groups_members_structure_step
 Structure step that will create all the needed group memberships by loading them from the groups.xml file performing the required matches. More...
 
class  restore_groups_setting
 root setting to control if restore will create groups/grouping information. More...
 
class  restore_groups_structure_step
 Structure step that will create all the needed groups and groupings by loading them from the groups.xml file performing the required matches. More...
 
class  restore_load_and_map_roles
 Execution step that, conditionally (if there isn't preloaded information), will load all the needed roles to backup_temp_ids. More...
 
class  restore_load_categories_and_questions
 Execution step that, conditionally (if there isn't preloaded information will load all the question categories and questions (header info only) to backup_temp_ids. More...
 
class  restore_load_included_files
 
class  restore_load_included_inforef_records
 
class  restore_load_included_users
 Execution step that, conditionally (if there isn't preloaded information and users have been selected in settings, will load all the needed users to backup_temp_ids. More...
 
class  restore_local_plugin
 Class extending standard restore_plugin in order to implement some helper methods related with local plugins. More...
 
class  restore_logs_setting
 root setting to control if restore will create logs or no, depends of @restore_users_setting exactly in the same way than @restore_role_assignments_setting so we extend from it More...
 
class  restore_module_structure_step
 Structure step to restore common course_module information. More...
 
class  restore_moodleform
 An abstract moodleform class specially designed for the restore forms. More...
 
class  restore_move_module_questions_categories
 Execution step that will move all the CONTEXT_MODULE question categories created at early stages of restore in course context (because modules weren't created yet) to their target module (matching by old-new-contextid mapping) More...
 
class  restore_outcomes_structure_step
 Structure step that will create all the needed outocomes by loading them from the outcomes.xml. More...
 
class  restore_plagiarism_plugin
 Class extending standard restore_plugin in order to implement some helper methods related with the plagiarism plugins. More...
 
class  restore_plan_builder
 Abstract class defining the static method in charge of building the whole restore plan, based in @restore_controller preferences. More...
 
class  restore_plugin
 Class implementing the plugins support for moodle2 restore. More...
 
class  restore_process_categories_and_questions
 Execution step that, conditionally (if there isn't preloaded information) will process all the needed categories and questions in order to decide and perform any action with them (create / map / error) Note: Any error will cause exception, as far as this is the same processing than the one into restore prechecks (that should have stopped process earlier) More...
 
class  restore_process_course_modules_availability
 Process legacy module availability records in backup_ids. More...
 
class  restore_process_file_aliases_queue
 Try to restore aliases and references to external files. More...
 
class  restore_process_included_users
 Execution step that, conditionally (if there isn't preloaded information and users have been selected in settings, will process all the needed users in order to decide and perform any action with them (create / map / error) Note: Any error will cause exception, as far as this is the same processing than the one into restore prechecks (that should have stopped process earlier) More...
 
class  restore_qtype_extrafields_plugin
 Class extending restore_qtype_plugin in order to use extra fields method. More...
 
class  restore_qtype_plugin
 Class extending standard restore_plugin in order to implement some helper methods related with the questions (qtype plugin) More...
 
class  restore_questions_activity_structure_step
 Abstract structure step to help activities that store question attempt data. More...
 
class  restore_ras_and_caps_structure_step
 
class  restore_rebuild_course_cache
 first, ensure that we have no gaps in section numbers and then, rebuid the course cache More...
 
class  restore_report_plugin
 
class  restore_review_form
 Restore complete process review form. More...
 
class  restore_review_pending_block_positions
 Review all the (pending) block positions in backup_ids, matching by contextid, creating positions as needed. More...
 
class  restore_role_assignments_setting
 root setting to control if restore will create role assignments or no (any level), depends of @restore_users_setting More...
 
class  restore_root_task
 Start task that provides all the settings common to all restores and other initial steps. More...
 
class  restore_scales_structure_step
 Structure step that will create all the needed scales by loading them from the scales.xml. More...
 
class  restore_schema_form
 Restore schema review form. More...
 
class  restore_search_base
 A base class that can be used to build a specific search upon. More...
 
class  restore_section_generic_setting
 generic section setting to pass various settings between tasks and steps More...
 
class  restore_section_included_setting
 Setting to define if one section is included or no. More...
 
class  restore_section_structure_step
 Structure step that will read the section.xml creating/updating sections as needed, rebuilding course cache and other friends. More...
 
class  restore_section_task
 section task that provides all the properties and common steps to be performed when one section is being restored More...
 
class  restore_section_userinfo_setting
 section backup setting to control if section will include user information or no, depends of @restore_users_setting More...
 
class  restore_settings_form
 Restore settings form. More...
 
class  restore_subplugin
 Class implementing the subplugins support for moodle2 restore. More...
 
class  restore_theme_plugin
 
class  restore_tool_plugin
 Admin tool restore plugin base class. More...
 
class  restore_ui
 This is the restore user interface class. More...
 
class  restore_ui_exception
 Restore user interface exception. More...
 
class  restore_ui_independent_stage
 Abstract class used to represent a restore stage that is indenependent. More...
 
class  restore_ui_stage
 Abstract stage class. More...
 
class  restore_ui_stage_complete
 This is the completed stage. More...
 
class  restore_ui_stage_confirm
 The confirmation stage. More...
 
class  restore_ui_stage_destination
 This is the destination stage. More...
 
class  restore_ui_stage_process
 Final stage of backup. More...
 
class  restore_ui_stage_review
 Confirmation stage. More...
 
class  restore_ui_stage_schema
 Schema stage of backup process. More...
 
class  restore_ui_stage_settings
 This stage is the settings stage. More...
 
class  restore_update_availability
 Updates the availability data for course modules and sections. More...
 
class  restore_users_setting
 root setting to control if restore will create user information A lot of other settings are dependent of this (module's user info, grades user info, messages, blogs... More...
 
class  restore_userscompletion_setting
 root setting to control if restore will create completion info or no, depends of @restore_users_setting exactly in the same way than @restore_role_assignments_setting so we extend from it More...
 
class  restore_userscompletion_structure_step
 Structure step that will process the user activity completion information if all these conditions are met: More...
 
class  root_backup_setting
 Abstract class containing all the common stuff for root backup settings. More...
 

Functions

 add_question_usages ($element, &$paths, $nameprefix='')
 Attach below $element (usually attempts) the needed restore_path_elements to restore question_usages and all they contain. More...
 
 after_execute ()
 
 get_qtype_restorer ($qtype)
 Get the restore_qtype_plugin subclass for a specific question type. More...
 
 inform_new_usage_id ($newusageid)
 When process_question_usage creates the new usage, it calls this method to let the activity link to the new usage. More...
 
 process_question_attempt ($data)
 Process question_attempts.
 
 process_question_attempt_step ($data)
 Process question_attempt_steps.
 
 process_question_usage ($data)
 Process question_usages.
 
 questions_recode_layout ($layout)
 Given a list of question->ids, separated by commas, returns the recoded list, with all the restore question mappings applied. More...
 
 questions_recode_response_data ( $qtype, $newquestionid, $sequencenumber, array $response)
 Recode the respones data for a particular step of an attempt at at particular question. More...
 
 restore_question_attempt_step_worker ($data, $nameprefix)
 This method does the actual work for process_question_attempt_step or process_{nameprefix}_question_attempt_step. More...
 
 restore_question_attempt_worker ($data, $nameprefix)
 This method does the actual work for process_question_attempt or process_{nameprefix}_question_attempt. More...
 
 restore_question_usage_worker ($data, $nameprefix)
 This method does the actual work for process_question_usage or process_{nameprefix}_question_usage. More...
 

Variables

foreach($mods as $mod=> $moddir) $blocks = core_component::get_plugin_list('block')
 
foreach($mods as $mod=> $moddir) $blocks = core_component::get_plugin_list('block')
 
global $CFG
 
global $CFG
 
global core_backup\copy::$CFG
 
global $CFG
 
global $LINKS_ENCODERS_CACHE = array()
 
 $mods = core_component::get_plugin_list('mod')
 
 $mods = core_component::get_plugin_list('mod')
 
array $newquestionids = array()
 question_attempt->id to questionid.
 
trait restore_questions_attempt_data_trait
 Helper code for use by any plugin that stores question attempt data that it needs to back up. More...
 

Detailed Description

Function Documentation

◆ add_question_usages()

add_question_usages (   $element,
$paths,
  $nameprefix = '' 
)
protected

Attach below $element (usually attempts) the needed restore_path_elements to restore question_usages and all they contain.

If you use the $nameprefix parameter, then you will need to implement some extra methods in your class, like

protected function process_{nameprefix}question_attempt($data) { $this->restore_question_usage_worker($data, '{nameprefix}'); } protected function process_{nameprefix}question_attempt($data) { $this->restore_question_attempt_worker($data, '{nameprefix}'); } protected function process_{nameprefix}question_attempt_step($data) { $this->restore_question_attempt_step_worker($data, '{nameprefix}'); }

Parameters
restore_path_element$elementthe parent element that the usages are stored inside.
array$pathsthe paths array that is being built.
string$nameprefixshould match the prefix passed to the corresponding backup_questions_activity_structure_step::add_question_usages call.

◆ get_qtype_restorer()

get_qtype_restorer (   $qtype)
protected

Get the restore_qtype_plugin subclass for a specific question type.

Parameters
string$qtypee.g. multichoice.
Return values
restore_qtype_plugininstance.

◆ inform_new_usage_id()

inform_new_usage_id (   $newusageid)
abstractprotected

When process_question_usage creates the new usage, it calls this method to let the activity link to the new usage.

For example, the quiz uses this method to set quiz_attempts.uniqueid to the new usage id.

Parameters
integer$newusageid

◆ questions_recode_layout()

questions_recode_layout (   $layout)
protected

Given a list of question->ids, separated by commas, returns the recoded list, with all the restore question mappings applied.

Note: Used by quiz->questions and quiz_attempts->layout Note: 0 = page break (unconverted)

◆ questions_recode_response_data()

questions_recode_response_data (   $qtype,
  $newquestionid,
  $sequencenumber,
array  $response 
)

Recode the respones data for a particular step of an attempt at at particular question.

Parameters
string$qtypethe question type.
int$newquestionidthe question id.
int$sequencenumberthe sequence number.
array$responsethe response data to recode.

◆ restore_question_attempt_step_worker()

restore_question_attempt_step_worker (   $data,
  $nameprefix 
)
protected

This method does the actual work for process_question_attempt_step or process_{nameprefix}_question_attempt_step.

Parameters
array$datathe data from the XML file.
string$nameprefixthe element name prefix.

◆ restore_question_attempt_worker()

restore_question_attempt_worker (   $data,
  $nameprefix 
)
protected

This method does the actual work for process_question_attempt or process_{nameprefix}_question_attempt.

Parameters
array$datathe data from the XML file.
string$nameprefixthe element name prefix.

◆ restore_question_usage_worker()

restore_question_usage_worker (   $data,
  $nameprefix 
)
protected

This method does the actual work for process_question_usage or process_{nameprefix}_question_usage.

Parameters
array$datathe data from the XML file.
string$nameprefixthe element name prefix.

Variable Documentation

◆ restore_questions_attempt_data_trait

trait restore_questions_attempt_data_trait
Initial value:
{
protected array $qtypes = array()

Helper code for use by any plugin that stores question attempt data that it needs to back up.