Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
Conversion handler for the rubric grading strategy data. More...
Public Member Functions | |
get_component_name () | |
Returns the normalized name of the plugin, eg mod_workshop. More... | |
get_converter () | |
get_paths () | |
Activity module subplugins can't declare any paths to handle. More... | |
log ($message, $level, $a=null, $depth=null, $display=false) | |
This function will be responsible for handling the params, and to call to the corresponding logger->process() once all modifications in params have been performed. | |
on_elements_end () | |
Processes gathered elements and rubrics. | |
on_elements_start () | |
Prepare to gather legacy elements info for a new workshop instance. | |
on_legacy_element_end () | |
Called when we reach </ELEMENT> | |
process_legacy_element (array $data, array $raw) | |
Processes one <ELEMENT> More... | |
process_legacy_rubric ($data, $raw) | |
Processes one <RUBRIC> | |
use_xml_writer (xml_writer $xmlwriter) | |
Provides a xml_writer instance to this workshopform handler. More... | |
Protected Member Functions | |
close_xml_writer () | |
Close the XML writer. More... | |
convert_legacy_criterion_elements () | |
Processes gathered elements coming from the legacy criterion strategy. More... | |
convert_legacy_rubric_elements () | |
Processes gathered elements coming from the legacy rubric strategy. | |
has_xml_writer () | |
Checks if the XML writer has been opened by self::open_xml_writer(). More... | |
make_sure_xml_exists ($filename, $rootelement=false, $content=array()) | |
Makes sure that a new XML file exists, or creates it itself. More... | |
open_xml_writer ($filename) | |
Opens the XML writer - after calling, one is free to use $xmlwriter. More... | |
write_xml ($element, array $data, array $attribs=array(), $parent='/') | |
Writes the given XML tree data into the currently opened file. More... | |
Protected Attributes | |
moodle1_converter | $converter |
array | $elements = array() |
legacy elements to process | |
moodle1_mod_handler | $parenthandler |
string | $pluginname |
string | $plugintype |
array | $rubrics = array() |
legacy rubrics records to process | |
null string | $xmlfilename |
the name of file we are writing to | |
null xml_writer | $xmlwriter |
Conversion handler for the rubric grading strategy data.
|
protectedinherited |
Close the XML writer.
At the moment, the caller must close all tags before calling
void |
Reimplemented in moodle1_qtype_handler.
|
protected |
Processes gathered elements coming from the legacy criterion strategy.
Legacy criterion strategy is converted to a rubric with single rubric item and the layout set to 'list'.
|
inherited |
Returns the normalized name of the plugin, eg mod_workshop.
string |
|
inherited |
moodle1_converter | the converter that required this handler |
|
finalinherited |
Activity module subplugins can't declare any paths to handle.
The paths must be registered by the parent module and then re-dispatched to the relevant subplugins for eventual processing.
array | empty array |
|
protectedinherited |
Checks if the XML writer has been opened by self::open_xml_writer().
bool |
|
protectedinherited |
Makes sure that a new XML file exists, or creates it itself.
This is here so we can check that all XML files that the restore process relies on have been created by an executed handler. If the file is not found, this method can create it using the given $rootelement as an empty root container in the file.
string | $filename | relative file name like 'course/course.xml' |
string | bool | $rootelement | root element to use, false to not create the file |
array | $content | content of the root element |
bool | true is the file existed, false if it did not |
|
protectedinherited |
Opens the XML writer - after calling, one is free to use $xmlwriter.
string | $filename | XML file name to write into |
void |
Reimplemented in moodle1_qtype_handler.
moodle1_workshopform_rubric_handler::process_legacy_element | ( | array | $data, |
array | $raw | ||
) |
Processes one <ELEMENT>
array | $data | legacy element data |
array | $raw | raw element data |
Reimplemented from moodle1_workshopform_handler.
|
inherited |
Provides a xml_writer instance to this workshopform handler.
xml_writer | $xmlwriter |
|
protectedinherited |
Writes the given XML tree data into the currently opened file.
string | $element | the name of the root element of the tree |
array | $data | the associative array of data to write |
array | $attribs | list of additional fields written as attributes instead of nested elements |
string | $parent | used internally during the recursion, do not set yourself |