Skip to content

Commit

Permalink
MDL-9716
Browse files Browse the repository at this point in the history
'answernumbering' field now supported
  • Loading branch information
thepurpleblob committed May 29, 2007
1 parent ef24d5b commit 2377f8d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions question/format/xml/format.php
Expand Up @@ -172,6 +172,7 @@ function import_multichoice( $question ) {
$single = $this->getpath( $question, array('#','single',0,'#'), 'true' );
$qo->single = $this->trans_single( $single );
$shuffleanswers = $this->getpath( $question, array('#','shuffleanswers',0,'#'), 'false' );
$qo->answernumbering = $this->getpath( $question, array('#','answernumbering',0,'#'), 'abc' );
$qo->shuffleanswers = $this->trans_single($shuffleanswers);
$qo->correctfeedback = $this->getpath( $question, array('#','correctfeedback',0,'#','text',0,'#'), '', true );
$qo->partiallycorrectfeedback = $this->getpath( $question, array('#','partiallycorrectfeedback',0,'#','text',0,'#'), '', true );
Expand Down Expand Up @@ -872,6 +873,7 @@ function writequestion( $question ) {
$expout .= " <correctfeedback>".$this->writetext($question->options->correctfeedback, 3)."</correctfeedback>\n";
$expout .= " <partiallycorrectfeedback>".$this->writetext($question->options->partiallycorrectfeedback, 3)."</partiallycorrectfeedback>\n";
$expout .= " <incorrectfeedback>".$this->writetext($question->options->incorrectfeedback, 3)."</incorrectfeedback>\n";
$expout .= " <answernumbering>{$question->options->answernumbering}</answernumbering>\n";
foreach($question->options->answers as $answer) {
$percent = $answer->fraction * 100;
$expout .= " <answer fraction=\"$percent\">\n";
Expand Down

0 comments on commit 2377f8d

Please sign in to comment.