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


Static Public Member Functions | |
| static | get_components_and_fileareas ($filter=null) |
| static | get_qtype_fileareas () |
Protected Member Functions | |
| add_question_question_answers ($element) | |
| add_question_numerical_units ($element) | |
| add_question_numerical_options ($element) | |
| add_question_datasets ($element) | |
Class extending standard backup_plugin in order to implement some helper methods related with the questions (qtype plugin)
TODO: Finish phpdocs
Definition at line 31 of file backup_qtype_plugin.class.php.
| add_question_datasets | ( | $ | element | ) | [protected] |
Attach to $element (usually questions) the needed backup structures for question_datasets for a given question Used by calculated qtypes
Definition at line 131 of file backup_qtype_plugin.class.php.

| add_question_numerical_options | ( | $ | element | ) | [protected] |
Attach to $element (usually questions) the needed backup structures for question_numerical_options for a given question Used both by calculated and numerical qtypes
Definition at line 105 of file backup_qtype_plugin.class.php.

| add_question_numerical_units | ( | $ | element | ) | [protected] |
Attach to $element (usually questions) the needed backup structures for question_numerical_units for a given question Used both by calculated and numerical qtypes
Definition at line 74 of file backup_qtype_plugin.class.php.

| add_question_question_answers | ( | $ | element | ) | [protected] |
Attach to $element (usually questions) the needed backup structures for question_answers for a given question Used by various qtypes (calculated, essay, multianswer, multichoice, numerical, shortanswer, truefalse)
Definition at line 39 of file backup_qtype_plugin.class.php.

| static get_components_and_fileareas | ( | $ | filter = null | ) | [static] |
Returns all the components and fileareas used by all the installed qtypes
The method introspects each qtype, asking it about fileareas used. Then, one 2-level array is returned. 1st level is the component name (qtype_xxxx) and 2nd level is one array of filearea => mappings to look
Note that this function is used both in backup and restore, so it is important to use the same mapping names (usually, name of the table in singular) always
TODO: Surely this can be promoted to backup_plugin easily and make it to work for ANY plugin, not only qtypes (but we don't need it for now)
Definition at line 181 of file backup_qtype_plugin.class.php.


| static get_qtype_fileareas | ( | ) | [static] |
Returns one array with filearea => mappingname elements for the qtype
Used by get_components_and_fileareas to know about all the qtype files to be processed both in backup and restore.
Reimplemented in backup_qtype_calculated_plugin, backup_qtype_match_plugin, and backup_qtype_essay_plugin.
Definition at line 211 of file backup_qtype_plugin.class.php.