From eb01b2e97653b0fb57fcbc96e4aa32e2a9d39fe0 Mon Sep 17 00:00:00 2001 From: gbateson Date: Mon, 31 Aug 2009 02:08:00 +0000 Subject: [PATCH] MDL-20184 when importing questions from Hot Potatoes files to Moodle question-bank / Quiz module, the readquestions() function wil return "false", to signify an error, if no questions are detected in the import file --- question/format/hotpot/format.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/question/format/hotpot/format.php b/question/format/hotpot/format.php index e701b5a955..83f0a5bd50 100644 --- a/question/format/hotpot/format.php +++ b/question/format/hotpot/format.php @@ -102,7 +102,12 @@ class qformat_hotpot extends qformat_default { notice("Unknown quiz type '$xml->quiztype'"); } } // end switch - return $questions; + + if (count($questions)) { + return $questions; + } else { + return false; + } } function process_jcloze(&$xml, &$questions) { -- 2.39.5