Permalink
Browse files

MDL-38487 qtype match restore: problem with blank ids.

As it happens, this field is useless, and has been removed from the DB
in 2.5. Therefore, we only need a work-around for stable branches.
  • Loading branch information...
timhunt committed Mar 15, 2013
1 parent 43ded67 commit c1288cd726293131093e6d2f34bb741970216f22
Showing with 3 additions and 0 deletions.
  1. +3 −0 question/type/match/backup/moodle2/restore_qtype_match_plugin.class.php
@@ -185,6 +185,9 @@ public function after_execute_question() {
WHERE bi.backupid = ?
AND bi.itemname = 'question_created'", array($this->get_restoreid()));
foreach ($rs as $rec) {
+ if (!$rec->subquestions) {
+ continue;
+ }
$subquestionsarr = explode(',', $rec->subquestions);
foreach ($subquestionsarr as $key => $subquestion) {
$subquestionsarr[$key] = $this->get_mappingid(

0 comments on commit c1288cd

Please sign in to comment.