Skip to content

Commit

Permalink
MDL-20184 when importing questions from Hot Potatoes files to Moodle …
Browse files Browse the repository at this point in the history
…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 committed Aug 31, 2009
1 parent 8fbc973 commit 42dc4ca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion question/format/hotpot/format.php
Expand Up @@ -102,7 +102,12 @@ function readquestions ($lines) {
notice("Unknown quiz type '$xml->quiztype'"); notice("Unknown quiz type '$xml->quiztype'");
} }
} // end switch } // end switch
return $questions;
if (count($questions)) {
return $questions;
} else {
return false;
}
} }


function process_jcloze(&$xml, &$questions) { function process_jcloze(&$xml, &$questions) {
Expand Down

0 comments on commit 42dc4ca

Please sign in to comment.