Skip to content

Commit

Permalink
Merge branch 'MDL-28426' of git://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Nov 10, 2011
2 parents f3bf5eb + bbc8c32 commit 9fc402e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions question/type/questiontypebase.php
Expand Up @@ -986,10 +986,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 9fc402e

Please sign in to comment.