imscp conversion handler.
More...
|
| close_xml_writer () |
| Close the XML writer. More...
|
|
| get_cminfo ($instance, $modname=null) |
| Returns course module information for the given instance id. More...
|
|
| 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...
|
|
| parse_structure ($manifestfilepath, $imscp, $context) |
| Parse the IMS package structure for the $imscp->structure field. More...
|
|
| write_xml ($element, array $data, array $attribs=array(), $parent='/') |
| Writes the given XML tree data into the currently opened file. More...
|
|
imscp conversion handler.
This resource handler is called by moodle1_mod_resource_handler
- Copyright
- 2011 Andrew Davis andre.nosp@m.w@mo.nosp@m.odle..nosp@m.com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ close_xml_writer()
moodle1_xml_handler::close_xml_writer |
( |
| ) |
|
|
protectedinherited |
Close the XML writer.
At the moment, the caller must close all tags before calling
- Return values
-
Reimplemented in moodle1_qtype_handler.
◆ get_cminfo()
moodle1_mod_handler::get_cminfo |
( |
|
$instance, |
|
|
|
$modname = null |
|
) |
| |
|
protectedinherited |
Returns course module information for the given instance id.
The information for this instance id has been stashed by moodle1_course_outline_handler::process_course_module()
- Parameters
-
int | $instance | the module instance id |
string | $modname | the module type, defaults to $this->pluginname |
- Return values
-
◆ get_component_name()
moodle1_plugin_handler::get_component_name |
( |
| ) |
|
|
inherited |
Returns the normalized name of the plugin, eg mod_workshop.
- Return values
-
◆ get_converter()
moodle1_handler::get_converter |
( |
| ) |
|
|
inherited |
◆ get_modname()
moodle1_mod_handler::get_modname |
( |
| ) |
|
|
inherited |
Returns the name of the module, eg.
'forum'
- Return values
-
◆ get_paths()
moodle1_resource_successor_handler::get_paths |
( |
| ) |
|
|
finalinherited |
◆ has_xml_writer()
moodle1_xml_handler::has_xml_writer |
( |
| ) |
|
|
protectedinherited |
◆ make_sure_xml_exists()
moodle1_xml_handler::make_sure_xml_exists |
( |
|
$filename, |
|
|
|
$rootelement = false , |
|
|
|
$content = array() |
|
) |
| |
|
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.
- Parameters
-
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 |
- Return values
-
bool | true is the file existed, false if it did not |
◆ on_legacy_resource_end()
moodle1_resource_successor_handler::on_legacy_resource_end |
( |
array |
$data | ) |
|
|
inherited |
Called when the parses reaches the end </MOD> resource tag.
- Parameters
-
◆ open_xml_writer()
moodle1_xml_handler::open_xml_writer |
( |
|
$filename | ) |
|
|
protectedinherited |
Opens the XML writer - after calling, one is free to use $xmlwriter.
- Parameters
-
string | $filename | XML file name to write into |
- Return values
-
Reimplemented in moodle1_qtype_handler.
◆ parse_structure()
moodle1_mod_imscp_handler::parse_structure |
( |
|
$manifestfilepath, |
|
|
|
$imscp, |
|
|
|
$context |
|
) |
| |
|
protected |
Parse the IMS package structure for the $imscp->structure field.
- Parameters
-
string | $manifestfilepath | the full path to the manifest file to parse |
◆ write_xml()
moodle1_xml_handler::write_xml |
( |
|
$element, |
|
|
array |
$data, |
|
|
array |
$attribs = array() , |
|
|
|
$parent = '/' |
|
) |
| |
|
protectedinherited |
Writes the given XML tree data into the currently opened file.
- Parameters
-
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 |
The documentation for this class was generated from the following file: