From 7125544864c853968e9728912fbf66cd6903dfbf Mon Sep 17 00:00:00 2001 From: Mark Nielsen Date: Mon, 14 Mar 2011 15:01:25 -0700 Subject: [PATCH] Adding to moodle1 abstract structured step --- backup/converter/moodle1/stepslib.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/backup/converter/moodle1/stepslib.php b/backup/converter/moodle1/stepslib.php index 084d80db5169f..5f929a2779d25 100644 --- a/backup/converter/moodle1/stepslib.php +++ b/backup/converter/moodle1/stepslib.php @@ -74,6 +74,18 @@ public function get_renamed() { 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 @@ public function convert_data(array $data) { } $this->xmlwriter->full_tag($name, $this->mutate_datum($name, $datum)); } + foreach ($this->get_new() as $name => $datum) { + $this->xmlwriter->full_tag($name, $datum); + } } }