From 17e82988ba87460e156e6847042a4f0c46f2533c Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Mon, 2 Dec 2024 11:38:24 +0000 Subject: [PATCH] mod_studentquiz: Fix duplicated question categories in course backup --- backup/moodle2/backup_studentquiz_activity_task.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backup/moodle2/backup_studentquiz_activity_task.class.php b/backup/moodle2/backup_studentquiz_activity_task.class.php index bebaa74f..2beb1ba3 100644 --- a/backup/moodle2/backup_studentquiz_activity_task.class.php +++ b/backup/moodle2/backup_studentquiz_activity_task.class.php @@ -50,6 +50,9 @@ protected function define_my_steps() { // Backup studentquiz tables. $this->add_step(new backup_studentquiz_activity_structure_step('studentquiz_structure', 'studentquiz.xml')); + // Clean backup_temp_ids table of questions. + $this->add_step(new backup_delete_temp_questions('clean_temp_questions')); + // Backup question categories. $this->add_step(new backup_calculate_question_categories('activity_question_categories')); }