mirror of
https://github.com/moodle/moodle.git
synced 2025-02-13 12:34:28 +01:00
MDL-31058 qtype match 1.9 restore: fix restore of dodgy questions.
This commit is contained in:
parent
f6b4ec2b4a
commit
c9b8a56f58
@ -56,7 +56,11 @@ class moodle1_qtype_match_handler extends moodle1_qtype_handler {
|
||||
}
|
||||
|
||||
// convert match options
|
||||
$matchoptions = $data['matchoptions'][0];
|
||||
if (isset($data['matchoptions'])) {
|
||||
$matchoptions = $data['matchoptions'][0];
|
||||
} else {
|
||||
$matchoptions = array('shuffleanswers' => 1);
|
||||
}
|
||||
$matchoptions['id'] = $this->converter->get_nextid();
|
||||
$matchoptions['subquestions'] = implode(',', $matchids);
|
||||
$this->write_xml('matchoptions', $matchoptions, array('/matchoptions/id'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user