From bbc8c321742058526caf6745e8cdbafdf46d272c Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Mon, 31 Oct 2011 18:29:06 +0000 Subject: [PATCH] MDL-28426 qtype base export_to_xml does not write format. Fix based on Roger Moore's patch. --- question/type/questiontypebase.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/question/type/questiontypebase.php b/question/type/questiontypebase.php index 48ed3d35f99..432ec588014 100644 --- a/question/type/questiontypebase.php +++ b/question/type/questiontypebase.php @@ -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 .= " \n"; + $expout .= " format($answer->answerformat)}>\n"; $expout .= $format->writetext($answer->answer, 3, false); - $expout .= " \n"; + $expout .= " format($question->feedbackformat)}>\n"; $expout .= $format->writetext($answer->feedback, 4, false); $expout .= " \n"; if (is_array($extraanswersfields)) {