MDL-28426 qtype base export_to_xml does not write format.

Fix based on Roger Moore's patch.
This commit is contained in:
Tim Hunt
2011-11-03 11:24:29 +00:00
parent 735de1c276
commit bbc8c32174
+3 -2
View File
@@ -986,10 +986,11 @@ class question_type {
array_shift($extraanswersfields);
}
foreach ($question->options->answers as $answer) {
// TODO this should be re-factored to use $format->write_answer().
$percent = 100 * $answer->fraction;
$expout .= " <answer fraction=\"$percent\">\n";
$expout .= " <answer fraction=\"$percent\" {$format->format($answer->answerformat)}>\n";
$expout .= $format->writetext($answer->answer, 3, false);
$expout .= " <feedback>\n";
$expout .= " <feedback {$format->format($question->feedbackformat)}>\n";
$expout .= $format->writetext($answer->feedback, 4, false);
$expout .= " </feedback>\n";
if (is_array($extraanswersfields)) {