|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| process_question_answer ($data) | |
| process_question_numerical_unit ($data) | |
| process_question_numerical_option ($data) | |
| process_question_dataset_definition ($data) | |
| process_question_dataset_item ($data) | |
| recode_response ($questionid, $sequencenumber, array $response) | |
| recode_legacy_state_answer ($state) | |
Static Public Member Functions | |
| static | define_plugin_decode_contents () |
Protected Member Functions | |
| add_question_question_answers (&$paths) | |
| add_question_numerical_units (&$paths) | |
| add_question_numerical_options (&$paths) | |
| add_question_datasets (&$paths) | |
Class extending standard restore_plugin in order to implement some helper methods related with the questions (qtype plugin)
TODO: Finish phpdocs
Definition at line 31 of file restore_qtype_plugin.class.php.
| add_question_datasets | ( | &$ | paths | ) | [protected] |
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)
Definition at line 87 of file restore_qtype_plugin.class.php.


| add_question_numerical_options | ( | &$ | paths | ) | [protected] |
Add to $paths the restore_path_elements needed to handle question_numerical_options for a given question Used by various qtypes (calculated, numerical)
Definition at line 71 of file restore_qtype_plugin.class.php.


| add_question_numerical_units | ( | &$ | paths | ) | [protected] |
Add to $paths the restore_path_elements needed to handle question_numerical_units for a given question Used by various qtypes (calculated, numerical)
Definition at line 55 of file restore_qtype_plugin.class.php.


| add_question_question_answers | ( | &$ | paths | ) | [protected] |
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)
Definition at line 39 of file restore_qtype_plugin.class.php.


| static define_plugin_decode_contents | ( | ) | [static] |
Return the contents of the questions stuff that must be processed by the links decoder
Only common stuff to all plugins, in this case:
Note each qtype will have, if needed, its own define_decode_contents method
Reimplemented from restore_plugin.
Definition at line 346 of file restore_qtype_plugin.class.php.
| process_question_answer | ( | $ | data | ) |
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)
Definition at line 107 of file restore_qtype_plugin.class.php.

| process_question_dataset_definition | ( | $ | data | ) |
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)
Definition at line 223 of file restore_qtype_plugin.class.php.

| process_question_dataset_item | ( | $ | data | ) |
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)
Definition at line 287 of file restore_qtype_plugin.class.php.

| process_question_numerical_option | ( | $ | data | ) |
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)
Definition at line 196 of file restore_qtype_plugin.class.php.

| process_question_numerical_unit | ( | $ | data | ) |
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)
Definition at line 171 of file restore_qtype_plugin.class.php.

| recode_legacy_state_answer | ( | $ | state | ) |
Decode legacy question_states.answer for this qtype. Used when restoring 2.0 attempt data.
Reimplemented in restore_qtype_match_plugin, restore_qtype_multianswer_plugin, restore_qtype_multichoice_plugin, restore_qtype_truefalse_plugin, restore_qtype_calculatedmulti_plugin, and restore_qtype_random_plugin.
Definition at line 332 of file restore_qtype_plugin.class.php.
| recode_response | ( | $ | questionid, |
| $ | sequencenumber, | ||
| array $ | response | ||
| ) |
Do any re-coding necessary in the student response.
| int | $questionid | the new id of the question |
| int | $sequencenumber | of the step within the qusetion attempt. |
| array | the response data from the backup. |
Reimplemented in restore_qtype_match_plugin, restore_qtype_multianswer_plugin, restore_qtype_multichoice_plugin, and restore_qtype_calculatedmulti_plugin.
Definition at line 324 of file restore_qtype_plugin.class.php.