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...
1 parent 70d7e35 commit c5602897c16de7d476ae803b8861e5732fbec0b4 @timhunt timhunt committed Mar 15, 2013
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 c560289

Please sign in to comment.