From 4433fff5a8aa6e0c0fb67d9f8702c2d0fa948312 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Fri, 17 Aug 2007 09:47:51 +0000 Subject: [PATCH] Moved check for plugin import/export to the start rather than the end Merged from STABLE_18 --- question/format/gift/format.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/question/format/gift/format.php b/question/format/gift/format.php index 662b885ef7..f3462fed82 100755 --- a/question/format/gift/format.php +++ b/question/format/gift/format.php @@ -225,6 +225,12 @@ class qformat_gift extends qformat_default { // determine QUESTION TYPE $question->qtype = NULL; + // give plugins first try + // plugins must promise not to intercept standard qtypes + if ($question = $this->try_importing_using_qtypes( $lines, $question, $answertext )) { + return $question; + } + if ($description) { $question->qtype = DESCRIPTION; } @@ -262,10 +268,6 @@ class qformat_gift extends qformat_default { } if (!isset($question->qtype)) { - // try for plugins - if ($question = $this->try_importing_using_qtypes( $lines, $question, $answertext )) { - return $question; - } $giftqtypenotset = get_string('giftqtypenotset','quiz'); $this->error( $giftqtypenotset, $text ); return false; -- 2.39.5