diff --git a/backup/converter/moodle1/stepslib.php b/backup/converter/moodle1/stepslib.php index 084d80db516..5f929a2779d 100644 --- a/backup/converter/moodle1/stepslib.php +++ b/backup/converter/moodle1/stepslib.php @@ -74,6 +74,18 @@ abstract class moodle1_structure_step extends convert_structure_step { return array(); } + /** + * Return new fields and their values + * + * The key is the new field name and the value + * is the value to write to the XML file. + * + * @return array + */ + public function get_new() { + return array(); + } + /** * Last chance to modify the datum before * it is written to the XML file. @@ -115,6 +127,9 @@ abstract class moodle1_structure_step extends convert_structure_step { } $this->xmlwriter->full_tag($name, $this->mutate_datum($name, $datum)); } + foreach ($this->get_new() as $name => $datum) { + $this->xmlwriter->full_tag($name, $datum); + } } }