Skip to content

Commit

Permalink
MDL-47494 ddimageortext: NOBUG fixing import of text as well as image…
Browse files Browse the repository at this point in the history
… based drag items.
  • Loading branch information
jamiepratt committed Sep 13, 2011
1 parent 06f0077 commit e05bd4b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions question/type/ddimageortext/questiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@ public function import_from_xml($data, $question, $format, $extra=null) {
$filexml = $format->getpath($dragxml, array('#', 'file'), array());
$question->dragitem[$dragindex] =
$this->import_files_to_draft_file_area($format, $filexml);
if (count($filexml)) {
$question->dragitemtype[$dragindex] = 'image';
} else {
$question->dragitemtype[$dragindex] = 'word';
}
}

$drops = $data['#']['drop'];
Expand Down

0 comments on commit e05bd4b

Please sign in to comment.