mirror of
https://github.com/moodle/moodle.git
synced 2025-02-08 09:02:07 +01:00
Adding to moodle1 abstract structured step
This commit is contained in:
parent
d2c32ec8a1
commit
7125544864
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user