Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding to moodle1 abstract structured step

  • Loading branch information...
commit 7125544864c853968e9728912fbf66cd6903dfbf 1 parent d2c32ec
@mrmark mrmark authored mudrd8mz committed
Showing with 15 additions and 0 deletions.
  1. +15 −0 backup/converter/moodle1/stepslib.php
View
15 backup/converter/moodle1/stepslib.php
@@ -75,6 +75,18 @@ public function get_renamed() {
}
/**
+ * 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);
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.