Permalink
Browse files

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
  • Loading branch information...
gbateson
gbateson committed Aug 31, 2009
1 parent 8fbc973 commit 42dc4cad266bd374f4d34635e06773f1ffe3ce07
Showing with 6 additions and 1 deletion.
  1. +6 −1 question/format/hotpot/format.php
@@ -102,7 +102,12 @@ function readquestions ($lines) {
notice("Unknown quiz type '$xml->quiztype'");
}
} // end switch
- return $questions;
+
+ if (count($questions)) {
+ return $questions;
+ } else {
+ return false;
+ }
}
function process_jcloze(&$xml, &$questions) {

0 comments on commit 42dc4ca

Please sign in to comment.