4 include_once
"./Modules/Test/classes/inc.AssessmentConstants.php";
34 $this->
object = $a_object;
42 foreach ($answers as
$index => $answer) {
43 $linkrefid =
"response_$index";
45 "ident" => $linkrefid,
51 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackExportPresentation(
55 $this->
object->addQTIMaterial($a_xml_writer, $fb);
71 $feedback_allcorrect = $this->
object->feedbackOBJ->getGenericFeedbackExportPresentation(
75 $feedback_onenotcorrect = $this->
object->feedbackOBJ->getGenericFeedbackExportPresentation(
79 if (strlen($feedback_allcorrect . $feedback_onenotcorrect)) {
80 $a_xml_writer->xmlStartTag(
"resprocessing");
81 $a_xml_writer->xmlStartTag(
"outcomes");
82 $a_xml_writer->xmlStartTag(
"decvar");
83 $a_xml_writer->xmlEndTag(
"decvar");
84 $a_xml_writer->xmlEndTag(
"outcomes");
86 if (strlen($feedback_allcorrect)) {
90 $a_xml_writer->xmlStartTag(
"respcondition", $attrs);
92 $a_xml_writer->xmlStartTag(
"conditionvar");
94 "respident" =>
"points" 96 $a_xml_writer->xmlElement(
"varequal", $attrs, $this->
object->getPoints());
97 $a_xml_writer->xmlEndTag(
"conditionvar");
100 "feedbacktype" =>
"Response",
101 "linkrefid" =>
"response_allcorrect" 103 $a_xml_writer->xmlElement(
"displayfeedback", $attrs);
104 $a_xml_writer->xmlEndTag(
"respcondition");
107 if (strlen($feedback_onenotcorrect)) {
111 $a_xml_writer->xmlStartTag(
"respcondition", $attrs);
113 $a_xml_writer->xmlStartTag(
"conditionvar");
114 $a_xml_writer->xmlStartTag(
"not");
116 "respident" =>
"points" 118 $a_xml_writer->xmlElement(
"varequal", $attrs, $this->
object->getPoints());
119 $a_xml_writer->xmlEndTag(
"not");
120 $a_xml_writer->xmlEndTag(
"conditionvar");
123 "feedbacktype" =>
"Response",
124 "linkrefid" =>
"response_onenotcorrect" 126 $a_xml_writer->xmlElement(
"displayfeedback", $attrs);
127 $a_xml_writer->xmlEndTag(
"respcondition");
129 $a_xml_writer->xmlEndTag(
"resprocessing");
132 if (strlen($feedback_allcorrect)) {
134 "ident" =>
"response_allcorrect",
137 $a_xml_writer->xmlStartTag(
"itemfeedback", $attrs);
139 $a_xml_writer->xmlStartTag(
"flow_mat");
140 $this->
object->addQTIMaterial($a_xml_writer, $feedback_allcorrect);
141 $a_xml_writer->xmlEndTag(
"flow_mat");
142 $a_xml_writer->xmlEndTag(
"itemfeedback");
144 if (strlen($feedback_onenotcorrect)) {
146 "ident" =>
"response_onenotcorrect",
149 $a_xml_writer->xmlStartTag(
"itemfeedback", $attrs);
151 $a_xml_writer->xmlStartTag(
"flow_mat");
152 $this->
object->addQTIMaterial($a_xml_writer, $feedback_onenotcorrect);
153 $a_xml_writer->xmlEndTag(
"flow_mat");
154 $a_xml_writer->xmlEndTag(
"itemfeedback");
167 public function toXML($a_include_header =
true, $a_include_binary =
true, $a_shuffle =
false, $test_output =
false, $force_image_references =
false)
184 $a_xml_writer->
xmlElement(
"fieldlabel", null, $fieldLabel);
185 $a_xml_writer->
xmlElement(
"fieldentry", null, $fieldValue);
186 $a_xml_writer->
xmlEndTag(
"qtimetadatafield");
201 'additional_cont_edit_mode',
202 $this->
object->getAdditionalContentEditingMode()
__construct($a_object)
assQuestionExport constructor
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
exportFeedbackOnly($a_xml_writer)
Class for question exports.
addAnswerSpecificFeedback(ilXmlWriter $a_xml_writer, $answers)
addGeneralMetadata(ilXmlWriter $xmlwriter)
xmlEndTag($tag)
Writes an endtag.
addQtiMetaDataField(ilXmlWriter $a_xml_writer, $fieldLabel, $fieldValue)
adds a qti meta data field with given name and value to the passed xml writer (xml writer must be in ...
Create styles array
The data for the language used.
addAdditionalContentEditingModeInformation(ilXmlWriter $a_xml_writer)
adds a qti meta data field for ilias specific information of "additional content editing mode" (xml w...
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
addGenericFeedback(ilXmlWriter $a_xml_writer)
Create new PHPExcel object
obj_idprivate
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.