From: gbateson Date: Mon, 31 Aug 2009 02:08:00 +0000 (+0000) Subject: MDL-20184 when importing questions from Hot Potatoes files to Moodle question-bank... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=eb01b2e97653b0fb57fcbc96e4aa32e2a9d39fe0;p=moodle.git 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 --- 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) {