From 508fe4d8b5ca69db6e55b70cde5a861660933137 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Wed, 26 Nov 2008 13:10:18 +0000 Subject: [PATCH] MDL-17411 defaultquestion() now reflects the one in the question bank code, thus supressing lots of notices Merged from STABLE_19 --- mod/lesson/format.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mod/lesson/format.php b/mod/lesson/format.php index eb3573236f..7e7b306dcd 100644 --- a/mod/lesson/format.php +++ b/mod/lesson/format.php @@ -223,7 +223,21 @@ class qformat_default { // Somewhere to specify question parameters that are not handled // by import but are required db fields. // This should not be overridden. + global $CFG; + $question = new stdClass(); + $question->shuffleanswers = $CFG->quiz_shuffleanswers; + $question->defaultgrade = 1; + $question->image = ""; + $question->usecase = 0; + $question->multiplier = array(); + $question->generalfeedback = ''; + $question->correctfeedback = ''; + $question->partiallycorrectfeedback = ''; + $question->incorrectfeedback = ''; + $question->answernumbering = 'abc'; + $question->penalty = 0.1; + $question->length = 1; $question->qoption = 0; $question->layout = 1; -- 2.39.5