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

This commit is contained in:
gbateson
2009-08-31 02:08:00 +00:00
parent 489a7b243f
commit eb01b2e976
+6 -1
View File
@@ -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) {