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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user