mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-14764 - Imported multichoice questions may have a blank answernumbering value, which results in an "ERR" prefix to all answers' text. Thanks to Nate H for the fix.
This commit is contained in:
parent
568df4756a
commit
c0ffeb3969
@ -180,7 +180,12 @@ class qformat_xml extends qformat_default {
|
||||
$qo->correctfeedback = $this->getpath( $question, array('#','correctfeedback',0,'#','text',0,'#'), '', true );
|
||||
$qo->partiallycorrectfeedback = $this->getpath( $question, array('#','partiallycorrectfeedback',0,'#','text',0,'#'), '', true );
|
||||
$qo->incorrectfeedback = $this->getpath( $question, array('#','incorrectfeedback',0,'#','text',0,'#'), '', true );
|
||||
|
||||
|
||||
// There was a time on the 1.8 branch when it could output an empty answernumbering tag, so fix up any found.
|
||||
if (empty($qo->answernumbering)) {
|
||||
$qo->answernumbering = 'abc';
|
||||
}
|
||||
|
||||
// run through the answers
|
||||
$answers = $question['#']['answer'];
|
||||
$a_count = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user