]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-17411
authorthepurpleblob <thepurpleblob>
Wed, 26 Nov 2008 13:10:18 +0000 (13:10 +0000)
committerthepurpleblob <thepurpleblob>
Wed, 26 Nov 2008 13:10:18 +0000 (13:10 +0000)
defaultquestion() now reflects the one in the question bank code, thus supressing
lots of notices

Merged from STABLE_19

mod/lesson/format.php

index eb3573236f3fb6ba54ef06cb1cc6ec3b2244d707..7e7b306dcd06d48747db453d18c1e1e2cf510395 100644 (file)
@@ -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;