Skip to content

Commit

Permalink
Merge branch 'MDL-28426_21' of git://github.com/timhunt/moodle into M…
Browse files Browse the repository at this point in the history
…OODLE_21_STABLE
  • Loading branch information
stronk7 committed Nov 10, 2011
2 parents 147ec85 + 2dd93c0 commit 8ec13b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions question/type/questiontypebase.php
Original file line number Diff line number Diff line change
Expand Up @@ -995,10 +995,11 @@ public function export_to_xml($question, $format, $extra=null) {
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)) {
Expand Down

0 comments on commit 8ec13b3

Please sign in to comment.