Browse files

Merge branch 'MDL-31058_21' of git://github.com/timhunt/moodle into M…

…OODLE_21_STABLE
  • Loading branch information...
2 parents 158c275 + f38065f commit 6f892151beafdcd96dafbfe671f846b0d55cd048 @stronk7 stronk7 committed Jan 23, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 question/type/match/backup/moodle1/lib.php
View
6 question/type/match/backup/moodle1/lib.php
@@ -56,7 +56,11 @@ public function process_question(array $data, array $raw) {
}
// 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'));

0 comments on commit 6f89215

Please sign in to comment.