diff --git a/mod/quiz/format.php b/mod/quiz/format.php index 4954c416b1c..ae3605e18e5 100644 --- a/mod/quiz/format.php +++ b/mod/quiz/format.php @@ -138,6 +138,21 @@ class quiz_default_format { } + function defaultquestion() { + // returns an "empty" question + // Somewhere to specify question parameters that are not handled + // by import but are required db fields. + // This should not be overridden. + $question = new stdClass(); + $question->shuffleanswers = 0; + $question->defaultgrade = 1; + $question->image = ""; + $question->usecase = 0; + $question->multiplier = array(); + + return $question; + } + function readquestion($lines) { /// Given an array of lines known to define a question in /// this format, this function converts it into a question