Permalink
Browse files

Adding to moodle1 abstract structured step

  • Loading branch information...
1 parent d2c32ec commit 7125544864c853968e9728912fbf66cd6903dfbf @mrmark mrmark committed with mudrd8mz Mar 14, 2011
Showing with 15 additions and 0 deletions.
  1. +15 −0 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);
+ }
}
}

0 comments on commit 7125544

Please sign in to comment.