Moodle  2.2.1
http://www.collinsharper.com
restore_qtype_multianswer_plugin Class Reference
Inheritance diagram for restore_qtype_multianswer_plugin:
Collaboration diagram for restore_qtype_multianswer_plugin:

Public Member Functions

 process_multianswer ($data)
 after_execute_question ()
 recode_response ($questionid, $sequencenumber, array $response)
 recode_legacy_state_answer ($state)

Protected Member Functions

 define_question_plugin_structure ()

Detailed Description

restore plugin class that provides the necessary information needed to restore one multianswer qtype plugin

Definition at line 35 of file restore_qtype_multianswer_plugin.class.php.


Member Function Documentation

This method is executed once the whole restore_structure_step this step is part of (restore_create_categories_and_questions) has ended processing the whole xml structure. Its name is: "after_execute_" + connectionpoint ("question")

For multianswer qtype we use it to restore the sequence column, containing one list of question ids

Definition at line 93 of file restore_qtype_multianswer_plugin.class.php.

Here is the call graph for this function:

Returns the paths to be handled by the plugin at question level

Definition at line 40 of file restore_qtype_multianswer_plugin.class.php.

Here is the call graph for this function:

process_multianswer ( data)

Process the qtype/multianswer element

Definition at line 57 of file restore_qtype_multianswer_plugin.class.php.

Here is the call graph for this function:

Given one question_states record, return the answer recoded pointing to all the restored stuff for multianswer questions

answer is one comma separated list of hypen separated pairs containing sequence (pointing to questions sequence in question_multianswer) and mixed answers. We'll delegate the recoding of answers to the proper qtype

Reimplemented from restore_qtype_plugin.

Definition at line 151 of file restore_qtype_multianswer_plugin.class.php.

recode_response ( questionid,
sequencenumber,
array response 
)

Do any re-coding necessary in the student response.

Parameters:
int$questionidthe new id of the question
int$sequencenumberof the step within the qusetion attempt.
arraythe response data from the backup.
Returns:
array the recoded response.

Reimplemented from restore_qtype_plugin.

Definition at line 116 of file restore_qtype_multianswer_plugin.class.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations