From 4ab4dcb27acbe981097ff94c07044da42ddf6906 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Mon, 24 Sep 2007 14:17:23 +0000 Subject: [PATCH] MDL-10916 - Import and Export of Cloze question misses out "generalfeedback" column. Merged from MOODLE_17_STABLE. --- question/format/xml/format.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/question/format/xml/format.php b/question/format/xml/format.php index e4826b3f7e..dfd2506f57 100755 --- a/question/format/xml/format.php +++ b/question/format/xml/format.php @@ -203,6 +203,7 @@ class qformat_xml extends qformat_default { // 'header' parts particular to multianswer $qo->qtype = MULTIANSWER; $qo->course = $this->course; + $qo->generalfeedback = $this->getpath( $questions, array('#','generalfeedback',0,'#','text',0,'#'), '', true ); if (!empty($questions)) { $qo->name = $this->import_text( $questions['#']['name'][0]['#']['text'] ); @@ -802,11 +803,15 @@ class qformat_xml extends qformat_default { // for Cloze type only $name_text = $this->writetext( $question->name ); $question_text = $this->writetext( $question->questiontext ); + $generalfeedback = $this->writetext( $question->generalfeedback ); $expout .= " \n"; $expout .= " $name_text\n"; $expout .= " \n"; $expout .= $question_text; $expout .= " \n"; + $expout .= " \n"; + $expout .= $generalfeedback; + $expout .= " \n"; } if (!empty($question->options->shuffleanswers)) { -- 2.39.5