Skip to content

Commit

Permalink
MDL-29366 qtype_essay import/export as Moodle XML loses files from gr…
Browse files Browse the repository at this point in the history
…aderinfo
  • Loading branch information
timhunt committed Sep 14, 2011
1 parent 5d2db8a commit 474abf1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions question/format/xml/format.php
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,8 @@ public function import_essay($question) {
array('#', 'graderinfo', 0, '#', 'text', 0, '#'), '', true);
$qo->graderinfo['format'] = $this->trans_format($this->getpath($question,
array('#', 'graderinfo', 0, '@', 'format'), 'moodle_auto_format'));
$qo->graderinfo['files'] = $this->import_files($this->getpath($question,
array('#', 'graderinfo', '0', '#', 'file'), array()));

return $qo;
}
Expand Down Expand Up @@ -1255,6 +1257,8 @@ public function writequestion($question) {
$expout .= " <graderinfo " .
$this->format($question->options->graderinfoformat) . ">\n";
$expout .= $this->writetext($question->options->graderinfo, 3);
$expout .= $this->writefiles($fs->get_area_files($contextid, 'qtype_essay',
'graderinfo', $question->id));
$expout .= " </graderinfo>\n";
break;

Expand Down

0 comments on commit 474abf1

Please sign in to comment.