From 5bed54e1fcac2258c15631923e282426c2350316 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Tue, 16 Jan 2007 12:12:26 +0000 Subject: [PATCH] MDL-8100, defaultgrade not imported. Question obect initialisation and value import wrong way round - whoops! --- question/format/xml/format.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/question/format/xml/format.php b/question/format/xml/format.php index a5af6a12ad..32952afb6d 100755 --- a/question/format/xml/format.php +++ b/question/format/xml/format.php @@ -1,3 +1,4 @@ + defaultquestion(); $name = $this->import_text( $question['#']['name'][0]['#']['text'] ); $qtext = $this->import_text( $question['#']['questiontext'][0]['#']['text'] ); $qformat = $question['#']['questiontext'][0]['@']['format']; @@ -114,9 +116,9 @@ class qformat_xml extends qformat_default { if (!empty($question['#']['defaultgrade'][0]['#'])) { $qo->defaultgrade = $question['#']['defaultgrade'][0]['#']; } + $penalty = $question['#']['penalty'][0]['#']; - $qo = $this->defaultquestion(); $qo->name = $name; $qo->questiontext = $qtext; $qo->questiontextformat = $this->trans_format( $qformat ); -- 2.39.5