mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
Merge branch 'MDL-31058' of git://github.com/timhunt/moodle
This commit is contained in:
commit
ebf552ca89
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue