4 include_once
"./Modules/Test/classes/inc.AssessmentConstants.php";
34 $this->
object = $a_object;
42 foreach ($answers as $index => $answer)
44 $linkrefid =
"response_$index";
46 "ident" => $linkrefid,
52 $fb = $this->
object->feedbackOBJ->getSpecificAnswerFeedbackExportPresentation(
53 $this->
object->getId(), $index
55 $this->
object->addQTIMaterial($a_xml_writer, $fb);
71 $feedback_allcorrect = $this->
object->feedbackOBJ->getGenericFeedbackExportPresentation(
72 $this->
object->getId(), true
74 $feedback_onenotcorrect = $this->
object->feedbackOBJ->getGenericFeedbackExportPresentation(
75 $this->
object->getId(), false
77 if (strlen($feedback_allcorrect . $feedback_onenotcorrect))
79 $a_xml_writer->xmlStartTag(
"resprocessing");
80 $a_xml_writer->xmlStartTag(
"outcomes");
81 $a_xml_writer->xmlStartTag(
"decvar");
82 $a_xml_writer->xmlEndTag(
"decvar");
83 $a_xml_writer->xmlEndTag(
"outcomes");
85 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))
112 $a_xml_writer->xmlStartTag(
"respcondition", $attrs);
114 $a_xml_writer->xmlStartTag(
"conditionvar");
115 $a_xml_writer->xmlStartTag(
"not");
117 "respident" =>
"points" 119 $a_xml_writer->xmlElement(
"varequal", $attrs, $this->
object->getPoints());
120 $a_xml_writer->xmlEndTag(
"not");
121 $a_xml_writer->xmlEndTag(
"conditionvar");
124 "feedbacktype" =>
"Response",
125 "linkrefid" =>
"response_onenotcorrect" 127 $a_xml_writer->xmlElement(
"displayfeedback", $attrs);
128 $a_xml_writer->xmlEndTag(
"respcondition");
130 $a_xml_writer->xmlEndTag(
"resprocessing");
133 if (strlen($feedback_allcorrect))
136 "ident" =>
"response_allcorrect",
139 $a_xml_writer->xmlStartTag(
"itemfeedback", $attrs);
141 $a_xml_writer->xmlStartTag(
"flow_mat");
142 $this->
object->addQTIMaterial($a_xml_writer, $feedback_allcorrect);
143 $a_xml_writer->xmlEndTag(
"flow_mat");
144 $a_xml_writer->xmlEndTag(
"itemfeedback");
146 if (strlen($feedback_onenotcorrect))
149 "ident" =>
"response_onenotcorrect",
152 $a_xml_writer->xmlStartTag(
"itemfeedback", $attrs);
154 $a_xml_writer->xmlStartTag(
"flow_mat");
155 $this->
object->addQTIMaterial($a_xml_writer, $feedback_onenotcorrect);
156 $a_xml_writer->xmlEndTag(
"flow_mat");
157 $a_xml_writer->xmlEndTag(
"itemfeedback");
170 function toXML($a_include_header =
true, $a_include_binary =
true, $a_shuffle =
false, $test_output =
false, $force_image_references =
false)
187 $a_xml_writer->
xmlElement(
"fieldlabel", NULL, $fieldLabel);
188 $a_xml_writer->
xmlElement(
"fieldentry", NULL, $fieldValue);
189 $a_xml_writer->
xmlEndTag(
"qtimetadatafield");
203 $a_xml_writer,
'additional_cont_edit_mode', $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)
xmlElement($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE)
Writes a basic element (no children, just textual content)
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...
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.