18 include_once
"./Modules/TestQuestionPool/classes/export/qti12/class.assQuestionExport.php";
34 public function toXML($a_include_header =
true, $a_include_binary =
true, $a_shuffle =
false, $test_output =
false, $force_image_references =
false): string
37 $ilias = $DIC[
'ilias'];
39 include_once(
"./Services/Xml/classes/class.ilXmlWriter.php");
42 $a_xml_writer->xmlHeader();
43 $a_xml_writer->xmlStartTag(
"questestinterop");
46 "title" => $this->
object->getTitle(),
47 "maxattempts" => $this->
object->getNrOfTries()
49 $a_xml_writer->xmlStartTag(
"item", $attrs);
51 $a_xml_writer->xmlElement(
"qticomment", null, $this->
object->getComment());
52 $a_xml_writer->xmlStartTag(
"itemmetadata");
53 $a_xml_writer->xmlStartTag(
"qtimetadata");
54 $a_xml_writer->xmlStartTag(
"qtimetadatafield");
55 $a_xml_writer->xmlElement(
"fieldlabel", null,
"ILIAS_VERSION");
56 $a_xml_writer->xmlElement(
"fieldentry", null, $ilias->getSetting(
"ilias_version"));
57 $a_xml_writer->xmlEndTag(
"qtimetadatafield");
58 $a_xml_writer->xmlStartTag(
"qtimetadatafield");
59 $a_xml_writer->xmlElement(
"fieldlabel", null,
"QUESTIONTYPE");
60 $a_xml_writer->xmlElement(
"fieldentry", null, $this->
object->getQuestionType());
61 $a_xml_writer->xmlEndTag(
"qtimetadatafield");
62 $a_xml_writer->xmlStartTag(
"qtimetadatafield");
63 $a_xml_writer->xmlElement(
"fieldlabel", null,
"AUTHOR");
64 $a_xml_writer->xmlElement(
"fieldentry", null, $this->
object->getAuthor());
65 $a_xml_writer->xmlEndTag(
"qtimetadatafield");
71 $a_xml_writer->xmlStartTag(
"qtimetadatafield");
72 $a_xml_writer->xmlElement(
"fieldlabel", null,
"points");
73 $a_xml_writer->xmlElement(
"fieldentry", null, $this->
object->getPoints());
74 $a_xml_writer->xmlEndTag(
"qtimetadatafield");
75 $a_xml_writer->xmlStartTag(
"qtimetadatafield");
76 $a_xml_writer->xmlElement(
"fieldlabel", null,
"maxsize");
77 $a_xml_writer->xmlElement(
"fieldentry", null, $this->
object->getMaxSize());
78 $a_xml_writer->xmlEndTag(
"qtimetadatafield");
79 $a_xml_writer->xmlStartTag(
"qtimetadatafield");
80 $a_xml_writer->xmlElement(
"fieldlabel", null,
"allowedextensions");
81 $a_xml_writer->xmlElement(
"fieldentry", null, $this->
object->getAllowedExtensions());
82 $a_xml_writer->xmlEndTag(
"qtimetadatafield");
83 $a_xml_writer->xmlEndTag(
"qtimetadata");
84 $a_xml_writer->xmlEndTag(
"itemmetadata");
88 "label" => $this->
object->getTitle()
90 $a_xml_writer->xmlStartTag(
"presentation", $attrs);
92 $a_xml_writer->xmlStartTag(
"flow");
94 $this->
object->addQTIMaterial($a_xml_writer, $this->
object->getQuestion());
96 $a_xml_writer->xmlEndTag(
"flow");
97 $a_xml_writer->xmlEndTag(
"presentation");
103 $a_xml_writer->xmlEndTag(
"item");
104 $a_xml_writer->xmlEndTag(
"questestinterop");
106 $xml = $a_xml_writer->xmlDumpMem(
false);
107 if (!$a_include_header) {
108 $pos = strpos(
$xml,
"?>");
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
exportFeedbackOnly($a_xml_writer)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addGeneralMetadata(ilXmlWriter $xmlwriter)
addAdditionalContentEditingModeInformation(ilXmlWriter $a_xml_writer)
adds a qti meta data field for ilias specific information of "additional content editing mode" (xml w...
addSolutionHints(ilXmlWriter $writer)
toXML($a_include_header=true, $a_include_binary=true, $a_shuffle=false, $test_output=false, $force_image_references=false)
Returns a QTI xml representation of the question Returns a QTI xml representation of the question and...