function qformat_xml::presave_process in Quiz 6.6
Same name and namespace in other branches
- 6.5 includes/moodle/question/format/xml/format.php \qformat_xml::presave_process()
Enable any processing to be done on the content just prior to the file being saved default is to do nothing
Parameters
string output text:
string processed output text:
Overrides qformat_default::presave_process
File
- includes/
moodle/ question/ format/ xml/ format.php, line 726
Class
Code
function presave_process($content) {
// override method to allow us to add xml headers and footers
// add the xml headers and footers
$content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" . "<quiz>\n" . $content . "\n" . "</quiz>";
// make the xml look nice
$content = $this
->xmltidy($content);
return $content;
}