Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Provides the information to backup match questions. More...
Public Member Functions | |
define_plugin_structure ($connectionpoint) | |
Static Public Member Functions | |
static | get_components_and_fileareas ($filter=null) |
Returns all the components and fileareas used by all the installed qtypes. | |
static | get_qtype_fileareas () |
Returns one array with filearea => mappingname elements for the qtype. | |
Protected Member Functions | |
add_question_datasets ($element) | |
Attach to $element (usually questions) the needed backup structures for question_datasets for a given question Used by calculated qtypes. | |
add_question_numerical_options ($element) | |
Attach to $element (usually questions) the needed backup structures for question_numerical_options for a given question Used both by calculated and numerical qtypes. | |
add_question_numerical_units ($element) | |
Attach to $element (usually questions) the needed backup structures for question_numerical_units for a given question Used both by calculated and numerical qtypes. | |
add_question_question_answers ($element) | |
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) | |
define_question_plugin_structure () | |
Returns the qtype information to attach to question element. | |
get_plugin_element ($final_elements=null, $conditionparam=null, $conditionvalue=null) | |
Factory method that will return one backup_plugin_element (backup_optigroup_element) with its name automatically calculated, based one the plugin being handled (type, name) | |
get_recommended_name () | |
Simple helper function that suggests one name for the main nested element in plugins It's not mandatory to use it but recommended ;-) | |
get_setting_value ($name) | |
Returns the value of one (task/plan) setting. | |
Protected Attributes | |
string | $connectionpoint |
backup_optigroup_element | $optigroup |
string | $pluginname |
string | $plugintype |
backup_structure_step | $step |
backup_course_task backup_activity_task | $task |
Provides the information to backup match questions.
|
staticinherited |
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)
|
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 from backup_qtype_plugin.