diff --git a/question/type/random/backup/moodle2/restore_qtype_random_plugin.class.php b/question/type/random/backup/moodle2/restore_qtype_random_plugin.class.php index 44746315fa154..633d298237c9a 100644 --- a/question/type/random/backup/moodle2/restore_qtype_random_plugin.class.php +++ b/question/type/random/backup/moodle2/restore_qtype_random_plugin.class.php @@ -109,7 +109,7 @@ public function after_execute_question() { WHERE qtype = 'random' AND " . $DB->sql_compare_text('questiontext') . " = ? AND id IN (SELECT bi.newitemid - FROM {backup_ids_temp} AS bi + FROM {backup_ids_temp} bi WHERE bi.backupid = ? AND bi.itemname = 'question_created')";