mirror of
https://github.com/moodle/moodle.git
synced 2025-03-19 15:10:05 +01:00
MDL-79279 qformat_xml: multianswer import should support idnumber
Fix suggested by Georg Maißer.
This commit is contained in:
parent
b3ea1a9d5b
commit
848fd484d5
@ -535,6 +535,8 @@ class qformat_xml extends qformat_default {
|
||||
$qo->questiontext .= ' <img src="@@PLUGINFILE@@/' . $filename . '" />';
|
||||
}
|
||||
|
||||
$qo->idnumber = $this->getpath($question, ['#', 'idnumber', 0, '#'], null);
|
||||
|
||||
// Restore files in generalfeedback.
|
||||
$generalfeedback = $this->import_text_with_files($question,
|
||||
array('#', 'generalfeedback', 0), '', $this->get_format($qo->questiontextformat));
|
||||
|
@ -1588,6 +1588,7 @@ END;
|
||||
</generalfeedback>
|
||||
<penalty>0.5</penalty>
|
||||
<hidden>0</hidden>
|
||||
<idnumber>id-101</idnumber>
|
||||
<hint format="html">
|
||||
<text>Hint 1</text>
|
||||
</hint>
|
||||
@ -1612,6 +1613,7 @@ END;
|
||||
$expectedqa->name = 'Simple multianswer';
|
||||
$expectedqa->qtype = 'multianswer';
|
||||
$expectedqa->questiontext = 'Complete this opening line of verse: "The {#1} and the {#2} went to sea".';
|
||||
$expectedqa->idnumber = 'id-101';
|
||||
$expectedqa->generalfeedback =
|
||||
'General feedback: It\'s from "The Owl and the Pussy-cat" by Lear: "The owl and the pussycat went to sea".';
|
||||
$expectedqa->defaultmark = 2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user