See Release Notes
Long Term Support Release
Defines restore_qtype_plugin class
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: | 396 lines (17 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
restore_qtype_plugin:: (12 methods):
add_question_question_answers()
add_question_numerical_units()
add_question_numerical_options()
add_question_datasets()
process_question_answer()
process_question_numerical_unit()
process_question_numerical_option()
process_question_dataset_definition()
process_question_dataset_item()
recode_response()
recode_legacy_state_answer()
define_plugin_decode_contents()
Class: restore_qtype_plugin - X-Ref
Class extending standard restore_plugin in order to implement someadd_question_question_answers(&$paths) X-Ref |
Add to $paths the restore_path_elements needed to handle question_answers for a given question Used by various qtypes (calculated, essay, multianswer, multichoice, numerical, shortanswer, truefalse) |
add_question_numerical_units(&$paths) X-Ref |
Add to $paths the restore_path_elements needed to handle question_numerical_units for a given question Used by various qtypes (calculated, numerical) |
add_question_numerical_options(&$paths) X-Ref |
Add to $paths the restore_path_elements needed to handle question_numerical_options for a given question Used by various qtypes (calculated, numerical) |
add_question_datasets(&$paths) X-Ref |
Add to $paths the restore_path_elements needed to handle question_datasets (defs and items) for a given question Used by various qtypes (calculated, numerical) |
process_question_answer($data) X-Ref |
Processes the answer element (question answers). Common for various qtypes. It handles both creation (if the question is being created) and mapping (if the question already existed and is being reused) |
process_question_numerical_unit($data) X-Ref |
Processes the numerical_unit element (question numerical units). Common for various qtypes. It handles both creation (if the question is being created) and mapping (if the question already existed and is being reused) |
process_question_numerical_option($data) X-Ref |
Processes the numerical_option element (question numerical options). Common for various qtypes. It handles both creation (if the question is being created) and mapping (if the question already existed and is being reused) |
process_question_dataset_definition($data) X-Ref |
Processes the dataset_definition element (question dataset definitions). Common for various qtypes. It handles both creation (if the question is being created) and mapping (if the question already existed and is being reused) |
process_question_dataset_item($data) X-Ref |
Processes the dataset_item element (question dataset items). Common for various qtypes. It handles both creation (if the question is being created) and mapping (if the question already existed and is being reused) |
recode_response($questionid, $sequencenumber, array $response) X-Ref |
Do any re-coding necessary in the student response. param: int $questionid the new id of the question param: int $sequencenumber of the step within the qusetion attempt. param: array the response data from the backup. return: array the recoded response. |
recode_legacy_state_answer($state) X-Ref |
Decode legacy question_states.answer for this qtype. Used when restoring 2.0 attempt data. |
define_plugin_decode_contents() X-Ref |
Return the contents of the questions stuff that must be processed by the links decoder Only common stuff to all plugins, in this case: - question: text and feedback - question_answers: text and feedbak Note each qtype will have, if needed, its own define_decode_contents method |