diff --git a/question/format/xml/format.php b/question/format/xml/format.php index f7ac6b86390..f0abcd7573b 100644 --- a/question/format/xml/format.php +++ b/question/format/xml/format.php @@ -1437,20 +1437,20 @@ class qformat_xml extends qformat_default { foreach ($question->options->answers as $answer) { $percent = 100 * $answer->fraction; - $expout .= "\n"; + $expout .= " \n"; // The "" tags are an added feature, old files won't have them. - $expout .= " {$answer->answer}\n"; - $expout .= " {$answer->tolerance}\n"; - $expout .= " {$answer->tolerancetype}\n"; - $expout .= " " . + $expout .= $this->writetext($answer->answer, 3); + $expout .= " {$answer->tolerance}\n"; + $expout .= " {$answer->tolerancetype}\n"; + $expout .= " " . $answer->correctanswerformat . "\n"; - $expout .= " " . + $expout .= " " . $answer->correctanswerlength . "\n"; - $expout .= " format($answer->feedbackformat)}>\n"; - $expout .= $this->writetext($answer->feedback); + $expout .= " format($answer->feedbackformat)}>\n"; + $expout .= $this->writetext($answer->feedback, 4); $expout .= $this->write_files($this->feedbackfiles[$answer->id]); - $expout .= " \n"; - $expout .= "\n"; + $expout .= " \n"; + $expout .= " \n"; } if (isset($question->options->unitgradingtype)) { $expout .= " " .