From dfcbecd487498e534700f4a727cd892aea3b0785 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Thu, 30 Jun 2011 00:36:45 +0100 Subject: [PATCH] MDL-28103 when handling questions that have been deleted from the question bank, find the right updater class. --- question/engine/upgrade/behaviourconverters.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/question/engine/upgrade/behaviourconverters.php b/question/engine/upgrade/behaviourconverters.php index 0553b4e2f6e..881036ebee2 100644 --- a/question/engine/upgrade/behaviourconverters.php +++ b/question/engine/upgrade/behaviourconverters.php @@ -263,6 +263,12 @@ abstract class question_behaviour_attempt_updater { */ protected function make_qtype_updater() { global $CFG; + + if ($this->question->qtype == 'deleted') { + return new question_deleted_question_attempt_updater( + $this, $this->question, $this->logger, $this->qeupdater); + } + $path = $CFG->dirroot . '/question/type/' . $this->question->qtype . '/db/upgradelib.php'; if (!is_readable($path)) { throw new coding_exception("Question type {$this->question->qtype}