Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
|
Provides the information to backup calculatedmulti 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 calculatedmulti 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)
|
staticinherited |
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.