mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 02:46:40 +02:00
MDL-66801 questions: XML import/export should include category idnumbers
This commit is contained in:
parent
9528b1ff5b
commit
e247068d72
8 changed files with 48 additions and 19 deletions
|
@ -935,6 +935,7 @@ class qformat_xml extends qformat_default {
|
|||
// The import should have the format in human readable form, so translate to machine readable format.
|
||||
$qo->infoformat = $this->trans_format($question['#']['info'][0]['@']['format']);
|
||||
}
|
||||
$qo->idnumber = $this->getpath($question, array('#', 'idnumber', 0, '#'), null);
|
||||
return $qo;
|
||||
}
|
||||
|
||||
|
@ -1205,6 +1206,7 @@ class qformat_xml extends qformat_default {
|
|||
$expout .= " <info {$infoformat}>\n";
|
||||
$expout .= " {$categoryinfo}";
|
||||
$expout .= " </info>\n";
|
||||
$expout .= " <idnumber>{$question->idnumber}</idnumber>\n";
|
||||
$expout .= " </question>\n";
|
||||
return $expout;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue