Skip to content
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...
1 parent 6130645 commit 698092d1916d7817dbf495caf5b68c4107e9ab26 gbateson committed Aug 31, 2009
Showing with 6 additions and 1 deletion.
  1. +6 −1 question/format/hotpot/format.php
View
7 question/format/hotpot/format.php
@@ -101,7 +101,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 698092d

Please sign in to comment.
Something went wrong with that request. Please try again.