Skip to content

Commit

Permalink
Merge branch 'MDL-35987-master' of git://github.com/FMCorz/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed May 30, 2016
2 parents 485de12 + 9a601ad commit 7c8f4f6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ public function after_execute_question() {
AND bi.itemname = 'question_created'",
array($this->get_restoreid()));
foreach ($rs as $rec) {
$sequencearr = explode(',', $rec->sequence);
$sequencearr = preg_split('/,/', $rec->sequence, -1, PREG_SPLIT_NO_EMPTY);
if (substr_count($rec->sequence, ',') + 1 != count($sequencearr)) {
$this->task->log('Invalid sequence found in restored multianswer question ' . $rec->id, backup::LOG_WARNING);
}

foreach ($sequencearr as $key => $question) {
$sequencearr[$key] = $this->get_mappingid('question', $question);
}
Expand Down

0 comments on commit 7c8f4f6

Please sign in to comment.