Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…OODLE_21_STABLE
  • Loading branch information...
commit 6f892151beafdcd96dafbfe671f846b0d55cd048 2 parents 158c275 + f38065f
Eloy Lafuente (stronk7) stronk7 authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 question/type/match/backup/moodle1/lib.php
6 question/type/match/backup/moodle1/lib.php
View
@@ -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'));
Please sign in to comment.
Something went wrong with that request. Please try again.