From: thepurpleblob Date: Tue, 16 Jan 2007 12:12:26 +0000 (+0000) Subject: MDL-8100, defaultgrade not imported. Question obect initialisation and value import... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5bed54e1fcac2258c15631923e282426c2350316;p=moodle.git MDL-8100, defaultgrade not imported. Question obect initialisation and value import wrong way round - whoops! --- 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 );