From 8d34e84bb958aa30a8f642cdb229cc799ffe1064 Mon Sep 17 00:00:00 2001 From: David Castro Date: Thu, 7 Mar 2019 15:01:05 -0500 Subject: [PATCH] MDL-65008 question: Query enhancement. Adding core_question as an additional filter to the tag backup. --- backup/moodle2/backup_stepslib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backup/moodle2/backup_stepslib.php b/backup/moodle2/backup_stepslib.php index a2f922a573d..9218fef8a67 100644 --- a/backup/moodle2/backup_stepslib.php +++ b/backup/moodle2/backup_stepslib.php @@ -2270,7 +2270,11 @@ class backup_questions_structure_step extends backup_structure_step { FROM {tag} t JOIN {tag_instance} ti ON ti.tagid = t.id WHERE ti.itemid = ? - AND ti.itemtype = 'question'", array(backup::VAR_PARENTID)); + AND ti.itemtype = 'question' + AND ti.component = 'core_question'", + [ + backup::VAR_PARENTID + ]); // don't need to annotate ids nor files // (already done by {@link backup_annotate_all_question_files}