Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
restore_quiz_activity_structure_step Class Reference
Inheritance diagram for restore_quiz_activity_structure_step:

Protected Member Functions

 after_execute ()
 
 after_restore ()
 
 define_structure ()
 
 inform_new_usage_id ($newusageid)
 
 process_quiz ($data)
 Process the quiz data.
 
 process_quiz_attempt ($data)
 
 process_quiz_attempt_legacy ($data)
 
 process_quiz_feedback ($data)
 
 process_quiz_grade ($data)
 
 process_quiz_override ($data)
 
 process_quiz_question_instance ($data)
 Process quiz slots.
 
 process_quiz_question_legacy_instance ($data)
 Process the data for pre 4.0 quiz data where the question_references and question_set_references table introduced.
 
 process_quiz_section ($data)
 
 process_quiz_slot_tags ($data)
 Process a quiz_slot_tags to restore the tags to the new structure.
 

Protected Attributes

stdClass null $currentquizattempt = null
 $currentquizattempt Track the current quiz attempt being restored.
 
bool $legacyshufflequestionsoption = false
 when restoring old quizzes (2.8 or before) this records the shufflequestionsoption quiz option which has moved to the quiz_sections table.
 
array $oldquestionids = []
 Track old question ids that need to be removed at the end of the restore.
 
stdClass $oldquizlayout
 
bool $sectioncreated = false
 tracks whether the quiz contains at least one section.
 

Member Function Documentation

◆ process_quiz()

restore_quiz_activity_structure_step::process_quiz ( $data)
protected

Process the quiz data.

Parameters
stdClass | array$data

◆ process_quiz_question_instance()

restore_quiz_activity_structure_step::process_quiz_question_instance ( $data)
protected

Process quiz slots.

Parameters
stdClass | array$data

◆ process_quiz_question_legacy_instance()

restore_quiz_activity_structure_step::process_quiz_question_legacy_instance ( $data)
protected

Process the data for pre 4.0 quiz data where the question_references and question_set_references table introduced.

Parameters
stdClass | array$data

◆ process_quiz_slot_tags()

restore_quiz_activity_structure_step::process_quiz_slot_tags ( $data)
protected

Process a quiz_slot_tags to restore the tags to the new structure.

Parameters
stdClass | array$dataThe quiz_slot_tags data

Member Data Documentation

◆ $sectioncreated

bool restore_quiz_activity_structure_step::$sectioncreated = false
protected

tracks whether the quiz contains at least one section.

Before Moodle 2.9 quiz sections did not exist, so if the file being restored did not contain any, we need to create one in after_execute().


The documentation for this class was generated from the following file: