Skip to content

Commit

Permalink
Adding to moodle1 abstract structured step
Browse files Browse the repository at this point in the history
  • Loading branch information
polothy authored and mudrd8mz committed May 10, 2011
1 parent d2c32ec commit 7125544
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions backup/converter/moodle1/stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit 7125544

Please sign in to comment.