[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/backup/moodle2/ -> backup_qtype_plugin.class.php (summary)

Defines backup_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: 210 lines (8 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 6 functions

  add_question_question_answers()
  add_question_numerical_units()
  add_question_numerical_options()
  add_question_datasets()
  get_components_and_fileareas()
  get_qtype_fileareas()

Functions
Functions that are not part of a class:

add_question_question_answers($element)   X-Ref
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)


add_question_numerical_units($element)   X-Ref
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_numerical_options($element)   X-Ref
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_datasets($element)   X-Ref
Attach to $element (usually questions) the needed backup structures
for question_datasets for a given question
Used by calculated qtypes


get_components_and_fileareas($filter = null)   X-Ref
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)

get_qtype_fileareas()   X-Ref
Returns one array with filearea => mappingname elements for the qtype

Used by {@link get_components_and_fileareas} to know about all the qtype
files to be processed both in backup and restore.



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1