MDL-17411

defaultquestion() now reflects the one in the question bank code, thus supressing
lots of notices
This commit is contained in:
thepurpleblob
2008-11-26 13:08:32 +00:00
parent 498e0d12d8
commit 1272fbf749
+14
View File
@@ -220,7 +220,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;