MDL-27811 Fixed incorrect qtype_essay conversion

This commit is contained in:
David Mudrak
2011-06-13 11:11:31 +02:00
parent 486e889262
commit 85fbe3fdcf
+10 -7
View File
@@ -33,18 +33,21 @@ class moodle1_qtype_essay_handler extends moodle1_qtype_handler {
* @return array
*/
public function get_question_subpaths() {
return array(
'ANSWERS/ANSWER',
);
return array();
}
/**
* Appends the essay specific information to the question
*/
public function process_question(array $data, array $raw) {
// convert and write the answers
if (isset($data['answers'])) {
$this->write_answers($data['answers'], $this->pluginname);
}
// data added on the upgrade step 2011031000
$this->write_xml('essay', array(
'id' => $this->converter->get_nextid(),
'responseformat' => 'editor',
'responsefieldlines' => 15,
'attachments' => 0,
'graderinfo' => '',
'graderinfoformat' => FORMAT_MOODLE
), array('/essay/id'));
}
}