MDL-10916 - Import and Export of Cloze question misses out "generalfeedback" column. Merged from MOODLE_17_STABLE.

This commit is contained in:
tjhunt
2007-09-24 14:17:23 +00:00
parent 87dfa4d26f
commit 4ab4dcb27a
+5
View File
@@ -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 .= " <question type=\"$question_type\">\n";
$expout .= " <name>$name_text</name>\n";
$expout .= " <questiontext>\n";
$expout .= $question_text;
$expout .= " </questiontext>\n";
$expout .= " <generalfeedback>\n";
$expout .= $generalfeedback;
$expout .= " </generalfeedback>\n";
}
if (!empty($question->options->shuffleanswers)) {