Index: format.php =================================================================== RCS file: /cvsroot/moodle/moodle/question/format/xml/format.php,v retrieving revision 1.41.2.5 diff -u -r1.41.2.5 format.php --- format.php 27 May 2008 13:42:28 -0000 1.41.2.5 +++ format.php 26 Jun 2008 05:08:06 -0000 @@ -213,6 +213,12 @@ $qo->course = $this->course; $qo->generalfeedback = $this->getpath( $questions, array('#','generalfeedback',0,'#','text',0,'#'), '', true ); + $image = $this->getpath( $questions, array('#','image',0,'#'), '' ); + $image_base64 = $this->getpath( $questions, array('#','image_base64','0','#'),'' ); + if (!empty($image_base64)) { + $qo->image = $this->importimagefile( $image, stripslashes($image_base64) ); + } + if (!empty($questions)) { $qo->name = $this->import_text( $questions['#']['name'][0]['#']['text'] ); } @@ -820,6 +826,8 @@ $expout .= " \n"; $expout .= $question_text; $expout .= " \n"; + $expout .= " {$question->image}\n"; + $expout .= $this->writeimage($question->image); $expout .= " \n"; $expout .= $generalfeedback; $expout .= " \n";