Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-38880 Imported Cloze questions lose embedded images or other media

  • Loading branch information...
commit 50a9a7d498d50704c5e1f8542be643f185460a62 1 parent 931eff3
Jean-Michel Vedrine authored
View
36 question/format/xml/format.php
@@ -448,37 +448,43 @@ public function import_multichoice($question) {
* @return object question object
*/
public function import_multianswer($question) {
+ global $USER;
question_bank::get_qtype('multianswer');
- $questiontext['text'] = $this->import_text($question['#']['questiontext'][0]['#']['text']);
- $questiontext['format'] = FORMAT_HTML;
- $questiontext['itemid'] = '';
+ $questiontext = $this->import_text_with_files($question,
+ array('#', 'questiontext', 0));
$qo = qtype_multianswer_extract_question($questiontext);
// 'header' parts particular to multianswer
$qo->qtype = 'multianswer';
$qo->course = $this->course;
- $qo->generalfeedback = '';
$qo->name = $this->clean_question_name($this->import_text($question['#']['name'][0]['#']['text']));
$qo->questiontextformat = $questiontext['format'];
$qo->questiontext = $qo->questiontext['text'];
- $itemid = $this->import_files($this->getpath($question,
- array('#', 'questiontext', 0, '#', 'file'), array(), false));
- if (!empty($itemid)) {
- $qo->questiontextitemid = $itemid;
+ if (!empty($questiontext['itemid'])) {
+ $qo->questiontextitemid = $questiontext['itemid'];
}
+
// Backwards compatibility, deal with the old image tag.
$filedata = $this->getpath($question, array('#', 'image_base64', '0', '#'), null, false);
$filename = $this->getpath($question, array('#', 'image', '0', '#'), null, false);
if ($filedata && $filename) {
- $data = new stdClass();
- $data->content = $filedata;
- $data->encoding = 'base64';
- // Question file areas don't support subdirs, so convert path to filename if necessary.
- $data->name = clean_param(str_replace('/', '_', $filename), PARAM_FILE);
- $qo->questiontextfiles[] = $data;
- $qo->questiontext .= ' <img src="@@PLUGINFILE@@/' . $data->name . '" />';
+ $fs = get_file_storage();
+ if (empty($qo->questiontextitemid)) {
+ $qo->questiontextitemid = file_get_unused_draft_itemid();
+ }
+ $filename = clean_param(str_replace('/', '_', $filename), PARAM_FILE);
+ $filerecord = array(
+ 'contextid' => context_user::instance($USER->id)->id,
+ 'component' => 'user',
+ 'filearea' => 'draft',
+ 'itemid' => $qo->questiontextitemid,
+ 'filepath' => '/',
+ 'filename' => $filename,
+ );
+ $fs->create_file_from_string($filerecord, base64_decode($filedata));
+ $qo->questiontext .= ' <img src="@@PLUGINFILE@@/' . $filename . '" />';
}
// restore files in generalfeedback
View
27 question/format/xml/tests/fixtures/multianswer.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<quiz>
+<!-- question: 0 -->
+ <question type="category">
+ <category>
+ <text>$course$/Default for Test images in backup</text>
+
+ </category>
+ </question>
+
+<!-- question: 166 -->
+ <question type="cloze">
+ <name>
+ <text>cloze with images</text>
+ </name>
+ <questiontext format="html">
+ <text><![CDATA[<p>Match the following cities with the correct state,</p>
+<p>California <img src="@@PLUGINFILE@@/california-state-flag.png" alt="California flag" width="50" height="50" /> or Arizona <img src="@@PLUGINFILE@@/arizona_2.png" alt="Arizona flag" width="50" height="50" /><br />* San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}<br />* Tucson: {1:MULTICHOICE:California#Wrong~%100%Arizona#OK}<br />* Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong}<br />* Phoenix: {1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}<br />The capital of France is {1:SHORTANSWER:%100%Paris#Congratulations!<br />~%50%Marseille#No, that is the second largest city in France (after<br />Paris).~*#Wrong answer. The capital of France is Paris, of course.}.</p>]]></text>
+<file name="arizona_2.png" encoding="base64">iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAHjUlEQVRoBe1YaWhcVRT+3pt9y2SZZjVLs7RJrbbGWigGUVERhOKOQqsUS1uLCuICgmgVwT+K1YKgKOIC7lupUheqaAURbW3VpqbN1qyTfWYyycxk3ozn3DfvOUnfjM2GUObCnXdzzznfd+65955zWyDXchHIRSAXgVwEchHIRQDSd871SaM4FF4eRNOzXTC7E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Q6iMWiZEsM9Pd0MqNwloyTIFA3VyIZBgNGo4n0jAz6e7swZprkfVHZbIalz6j1q8ukTqfT2tWYM0h7ti0Xr3tQa1fnmrPGt8qE6XfPzu1UVFYzQ9aO44f2CZAY39pWz29+/jzxaIz7Hn5Mzh6/FUUN+NwubHn5NL9/lFs/UyswFExZFhZW1lBz12pe++UOYpEwZouVunu/yrt/fp2oALLk2LHa7PR0tGkKD4cDfPf5X/DGy/WEhLzq5StZseY+jZixbhNmLZWdu9Z+kZYPjuH1/M+91BcGA17scsYoLJ4jbMbFQl5tPRkOBTh/tkX7pmq5MycbtbqkaCKyn0qIK+bY8zRLL1u1AZ1e9igiqqv6PIMaKVqD3CxWO7Ur115+HLPUbxcZs1c6Bl1OzrWcFBdIR69LZ2ZRiSiS0BResKSamyuWcPajE5QtupU5ZRXidg4WVtWQ6yigqKRUjvqKpnTFbdUE/T6KS+djyc7RTo95BYWsXP9lqYeElIA23iouddPsufi9HjLNZjJNJno72yi9ZdF4aqoZUg3BqS/p/3nphamPQhCkvVNWOD0soiXyaWAT+U9jMt9PdSyyjkwLz0IsMtVtkdI/xUCKgRQDKQZSDFw/A/8FhCTNxUlCcTsAAAAASUVORK5CYII=</file> </questiontext>
+ <generalfeedback format="html">
+ <text><![CDATA[<p>This is a Moodle question <img src="@@PLUGINFILE@@/moodle.png" alt="Moodle logo" width="16" height="16" /></p>]]></text>
+<file name="moodle.png" encoding="base64">iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAHzSURBVDhPxZFbSJNhGIDXERsVGbKawWJaoyAYGeqNYgdl6zenrhhUlB0I6iJEbUl0WF1UUK2DYhDkGghu7Z+HraisPLAsu+0ygi66kCioqwg2t6f///YhzAVBXfTc/HzP9/J8L/wG/pG8QDw+TE+Xn/O+dva07MW5vZayys3yNp/ZwPPRBPuOHqGisordDc00Ki42bqhAjQ3Jid8jAvoL9vIt4qs463G73VRtrcFiseDvuSYG+TwB7y/zfdzHpzeDWachAjeuXyWkPqZ21zZ2Nrioa/JQarOjlK8jes7Eh/s18GwHRMxkgka+3lvEi1ubcgM63Zea6W5v5ESLB4fDwRVvNam+eRBey3TAxqObNl76rXwLFvAlsIyhC2W5gZ+JJmYixQS9q8RZZzpghwEr/R2LpYGPIYWZqJnYSWNugCkPPDDx1JddTyeZqCetasMdS6WB9OQB7Xet5kmbITeQntoP/YWEfSZxFoy5SA2YCXeukAJ+vD5MMl7Cw9YF2UAkGhIXmYSbZLgI9WKxOOukx52kVAvq6eXS6HOHyAyuRz0lN5hlwg19hcTOWqXQ0FxaXZPnGC4V7s+BsToRUM8YpdA2eHswG/DO2eDV7WpGWg30dpZIA5Nddkba5nP3+Epp4F2vwqh3CXeOLZyzwV/wvwPwC58bSNEdAkhaAAAAAElFTkSuQmCC</file> </generalfeedback>
+ <penalty>0.3333333</penalty>
+ <hidden>0</hidden>
+ </question>
+
+</quiz>
View
96 question/format/xml/tests/fixtures/sample_questions_with_old_image_tag.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<quiz>
+
+
+<!-- question: 0 -->
+ <question type="category">
+ <category>
+ <text>$course$/Default for Test images in backup</text>
+
+ </category>
+ </question>
+
+
+
+<!-- question: 5 -->
+ <question type="cloze">
+ <name><text>cloze question with image</text>
+</name>
+ <questiontext>
+<text><![CDATA[This is a multianswer question with an image in the old &quot;image&quot; field that was used in moodle 1.9.<br />Match the following cities with the correct state:<br />* San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}<br />* Tucson: {1:MULTICHOICE:California#Wrong~%100%Arizona#OK}<br />* Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong}<br />* Phoenix: {1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}<br />The capital of France is {1:SHORTANSWER:%100%Paris#Congratulations!<br />~%50%Marseille#No, that is the second largest city in France (after<br />Paris).~*#Wrong answer. The capital of France is Paris, of course.}.<br />]]></text>
+ </questiontext>
+<image>moodle.png</image>
+ <image_base64>
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAHzSURBVDhPxZFbSJNhGIDXERsVGbKawWJaoyAYGeqNYgdl6zenrhhUlB0I6iJEbUl0WF1UUK2DYhDkGghu7Z+HraisPLAsu+0ygi66kCioqwg2t6f///YhzAVBXfTc/HzP9/J8L/wG/pG8QDw+TE+Xn/O+dva07MW5vZayys3yNp/ZwPPRBPuOHqGisordDc00Ki42bqhAjQ3Jid8jAvoL9vIt4qs463G73VRtrcFiseDvuSYG+TwB7y/zfdzHpzeDWachAjeuXyWkPqZ21zZ2Nrioa/JQarOjlK8jes7Eh/s18GwHRMxkgka+3lvEi1ubcgM63Zea6W5v5ESLB4fDwRVvNam+eRBey3TAxqObNl76rXwLFvAlsIyhC2W5gZ+JJmYixQS9q8RZZzpghwEr/R2LpYGPIYWZqJnYSWNugCkPPDDx1JddTyeZqCetasMdS6WB9OQB7Xet5kmbITeQntoP/YWEfSZxFoy5SA2YCXeukAJ+vD5MMl7Cw9YF2UAkGhIXmYSbZLgI9WKxOOukx52kVAvq6eXS6HOHyAyuRz0lN5hlwg19hcTOWqXQ0FxaXZPnGC4V7s+BsToRUM8YpdA2eHswG/DO2eDV7WpGWg30dpZIA5Nddkba5nP3+Epp4F2vwqh3CXeOLZyzwV/wvwPwC58bSNEdAkhaAAAAAElFTkSuQmCC
+
+ </image_base64>
+ <generalfeedback>
+<text></text>
+ </generalfeedback>
+ <shuffleanswers>0</shuffleanswers>
+</question>
+
+
+
+<!-- question: 4 -->
+ <question type="multichoice">
+ <name><text>mcq with image</text>
+</name>
+ <questiontext format="html">
+<text><![CDATA[This is a multichoice question with an image in the old &quot;image&quot; field that was used in Moodle 1.9]]></text>
+ </questiontext>
+ <image>moodle.png</image>
+ <image_base64>
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAHzSURBVDhPxZFbSJNhGIDXERsVGbKawWJaoyAYGeqNYgdl6zenrhhUlB0I6iJEbUl0WF1UUK2DYhDkGghu7Z+HraisPLAsu+0ygi66kCioqwg2t6f///YhzAVBXfTc/HzP9/J8L/wG/pG8QDw+TE+Xn/O+dva07MW5vZayys3yNp/ZwPPRBPuOHqGisordDc00Ki42bqhAjQ3Jid8jAvoL9vIt4qs463G73VRtrcFiseDvuSYG+TwB7y/zfdzHpzeDWachAjeuXyWkPqZ21zZ2Nrioa/JQarOjlK8jes7Eh/s18GwHRMxkgka+3lvEi1ubcgM63Zea6W5v5ESLB4fDwRVvNam+eRBey3TAxqObNl76rXwLFvAlsIyhC2W5gZ+JJmYixQS9q8RZZzpghwEr/R2LpYGPIYWZqJnYSWNugCkPPDDx1JddTyeZqCetasMdS6WB9OQB7Xet5kmbITeQntoP/YWEfSZxFoy5SA2YCXeukAJ+vD5MMl7Cw9YF2UAkGhIXmYSbZLgI9WKxOOukx52kVAvq6eXS6HOHyAyuRz0lN5hlwg19hcTOWqXQ0FxaXZPnGC4V7s+BsToRUM8YpdA2eHswG/DO2eDV7WpGWg30dpZIA5Nddkba5nP3+Epp4F2vwqh3CXeOLZyzwV/wvwPwC58bSNEdAkhaAAAAAElFTkSuQmCC
+
+ </image_base64>
+ <generalfeedback>
+<text></text>
+ </generalfeedback>
+ <defaultgrade>1</defaultgrade>
+ <penalty>0.1</penalty>
+ <hidden>0</hidden>
+ <shuffleanswers>1</shuffleanswers>
+ <single>true</single>
+ <shuffleanswers>true</shuffleanswers>
+ <correctfeedback> <text></text>
+</correctfeedback>
+ <partiallycorrectfeedback> <text></text>
+</partiallycorrectfeedback>
+ <incorrectfeedback> <text></text>
+</incorrectfeedback>
+ <answernumbering>abc</answernumbering>
+ <answer fraction="0">
+ <text>
+wrong answer
+ </text>
+ <feedback>
+ <text>
+
+ </text>
+ </feedback>
+ </answer>
+ <answer fraction="0">
+ <text>
+another wrong answer
+ </text>
+ <feedback>
+ <text>
+
+ </text>
+ </feedback>
+ </answer>
+ <answer fraction="100">
+ <text>
+right answer
+ </text>
+ <feedback>
+ <text>
+
+ </text>
+ </feedback>
+ </answer>
+</question>
+
+
+</quiz>
Please sign in to comment.
Something went wrong with that request. Please try again.