From 85fbe3fdcf91ff70c432d088df57e5207dcf34cb Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Mon, 13 Jun 2011 11:11:31 +0200 Subject: [PATCH] MDL-27811 Fixed incorrect qtype_essay conversion --- question/type/essay/backup/moodle1/lib.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/question/type/essay/backup/moodle1/lib.php b/question/type/essay/backup/moodle1/lib.php index ad7b651f262..483ef0a0f85 100644 --- a/question/type/essay/backup/moodle1/lib.php +++ b/question/type/essay/backup/moodle1/lib.php @@ -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')); } }