33 public function toXML($a_include_header =
true, $a_include_binary =
true, $a_shuffle =
false, $test_output =
false, $force_image_references =
false): string
36 $ilias = $DIC[
'ilias'];
40 $a_xml_writer->xmlHeader();
41 $a_xml_writer->xmlStartTag(
"questestinterop");
43 "ident" =>
"il_" .
IL_INST_ID .
"_qst_" . $this->
object->getId(),
44 "title" => $this->
object->getTitle(),
45 "maxattempts" => $this->
object->getNrOfTries()
47 $a_xml_writer->xmlStartTag(
"item", $attrs);
49 $a_xml_writer->xmlElement(
"qticomment",
null, $this->
object->getComment());
50 $a_xml_writer->xmlStartTag(
"itemmetadata");
51 $a_xml_writer->xmlStartTag(
"qtimetadata");
52 $a_xml_writer->xmlStartTag(
"qtimetadatafield");
53 $a_xml_writer->xmlElement(
"fieldlabel",
null,
"ILIAS_VERSION");
54 $a_xml_writer->xmlElement(
"fieldentry",
null, $ilias->getSetting(
"ilias_version"));
55 $a_xml_writer->xmlEndTag(
"qtimetadatafield");
56 $a_xml_writer->xmlStartTag(
"qtimetadatafield");
57 $a_xml_writer->xmlElement(
"fieldlabel",
null,
"QUESTIONTYPE");
58 $a_xml_writer->xmlElement(
"fieldentry",
null, $this->
object->getQuestionType());
59 $a_xml_writer->xmlEndTag(
"qtimetadatafield");
60 $a_xml_writer->xmlStartTag(
"qtimetadatafield");
61 $a_xml_writer->xmlElement(
"fieldlabel",
null,
"AUTHOR");
62 $a_xml_writer->xmlElement(
"fieldentry",
null, $this->
object->getAuthor());
63 $a_xml_writer->xmlEndTag(
"qtimetadatafield");
69 $a_xml_writer->xmlStartTag(
"qtimetadatafield");
70 $a_xml_writer->xmlElement(
"fieldlabel",
null,
"points");
71 $a_xml_writer->xmlElement(
"fieldentry",
null, $this->
object->getPoints());
72 $a_xml_writer->xmlEndTag(
"qtimetadatafield");
73 $a_xml_writer->xmlStartTag(
"qtimetadatafield");
74 $a_xml_writer->xmlElement(
"fieldlabel",
null,
"maxsize");
75 $a_xml_writer->xmlElement(
"fieldentry",
null, $this->
object->getMaxSize());
76 $a_xml_writer->xmlEndTag(
"qtimetadatafield");
77 $a_xml_writer->xmlStartTag(
"qtimetadatafield");
78 $a_xml_writer->xmlElement(
"fieldlabel",
null,
"allowedextensions");
79 $a_xml_writer->xmlElement(
"fieldentry",
null, $this->
object->getAllowedExtensions());
80 $a_xml_writer->xmlEndTag(
"qtimetadatafield");
81 $a_xml_writer->xmlEndTag(
"qtimetadata");
82 $a_xml_writer->xmlEndTag(
"itemmetadata");
86 "label" => $this->
object->getTitle()
88 $a_xml_writer->xmlStartTag(
"presentation", $attrs);
90 $a_xml_writer->xmlStartTag(
"flow");
94 $a_xml_writer->xmlEndTag(
"flow");
96 $a_xml_writer->xmlEndTag(
"presentation");
100 $a_xml_writer->xmlEndTag(
"item");
101 $a_xml_writer->xmlEndTag(
"questestinterop");
103 $xml = $a_xml_writer->xmlDumpMem(
false);
104 if (!$a_include_header) {
105 $pos = strpos($xml,
"?>");
106 $xml = substr($xml, $pos + 2);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
exportFeedbackOnly($a_xml_writer)
addQTIMaterial(ilXmlWriter $a_xml_writer, string $a_material, bool $close_material_tag=true, bool $add_mobs=true)
Class for question exports.
addGeneralMetadata(ilXmlWriter $xmlwriter)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
addAdditionalContentEditingModeInformation(ilXmlWriter $a_xml_writer)
adds a qti meta data field for ilias specific information of "additional content editing mode" (xml w...
addSuggestedSolution(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...