19 declare(strict_types=1);
182 private array
$metadata = [
"label" =>
"",
"entry" =>
""];
193 int $a_mode = self::IL_MO_PARSE_QTI,
195 $a_import_idents =
'',
200 $this->parser_mode = $a_mode;
201 $this->questionfiles = $DIC->testQuestionPool()->questionFiles();
205 $this->qpl_id = $a_qpl_id;
206 $this->
lng = $DIC->language();
207 if (is_array($a_import_idents)) {
208 $this->import_idents = &$a_import_idents;
236 $this->tst_object = $a_tst_object;
237 $this->tst_id = $this->tst_object->
getId();
254 xml_set_object($a_xml_parser, $this);
255 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
256 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
261 $this->question_counter = 1;
262 parent::startParsing();
270 if ($this->depth[$a_xml_parser] > 0) {
271 return $this->path[$this->depth[$a_xml_parser] - 1];
281 public function handlerBeginTag($a_xml_parser,
string $a_name, array $a_attribs): void
283 switch ($this->parser_mode) {
284 case self::IL_MO_PARSE_QTI:
287 case self::IL_MO_VERIFY_QTI:
299 if ($this->do_nothing) {
302 $this->sametag =
false;
303 $this->characterbuffer =
"";
304 $this->depth[$a_xml_parser] = ($this->depth[$a_xml_parser] ?? 0) + 1;
305 $this->path[$this->depth[$a_xml_parser]] = strtolower($a_name);
306 $this->qti_element = $a_name;
308 switch (strtolower($a_name)) {
312 case "assessmentcontrol":
317 $this->in_objectives =
true;
319 case 'presentation_material':
321 $this->in_prensentation_material =
true;
327 $this->in_itemmetadata =
true;
329 case "qtimetadatafield":
330 $this->metadata = [
"label" =>
"",
"entry" =>
""];
341 case "displayfeedback":
351 if ($this->conditionvar != null) {
352 $this->conditionvar->addNot();
356 if ($this->conditionvar != null) {
357 $this->conditionvar->addAnd();
361 if ($this->conditionvar != null) {
362 $this->conditionvar->addOr();
370 foreach ($a_attribs as $attribute => $value) {
371 switch (strtolower($attribute)) {
373 $this->responsevar->setRespident($value);
376 $this->responsevar->setIndex($value);
383 foreach ($a_attribs as $attribute => $value) {
384 switch (strtolower($attribute)) {
386 $this->responsevar->setRespident($value);
389 $this->responsevar->setIndex($value);
396 foreach ($a_attribs as $attribute => $value) {
397 switch (strtolower($attribute)) {
399 $this->responsevar->setRespident($value);
402 $this->responsevar->setIndex($value);
409 foreach ($a_attribs as $attribute => $value) {
410 switch (strtolower($attribute)) {
412 $this->responsevar->setRespident($value);
415 $this->responsevar->setIndex($value);
422 foreach ($a_attribs as $attribute => $value) {
423 switch (strtolower($attribute)) {
425 $this->responsevar->setRespident($value);
428 $this->responsevar->setSetmatch($value);
431 $this->responsevar->setIndex($value);
438 foreach ($a_attribs as $attribute => $value) {
439 switch (strtolower($attribute)) {
441 $this->responsevar->setRespident($value);
444 $this->responsevar->setAreatype($value);
447 $this->responsevar->setIndex($value);
454 foreach ($a_attribs as $attribute => $value) {
455 switch (strtolower($attribute)) {
457 $this->responsevar->setCase($value);
460 $this->responsevar->setRespident($value);
463 $this->responsevar->setIndex($value);
468 case "respcondition":
470 foreach ($a_attribs as $attribute => $value) {
471 switch (strtolower($attribute)) {
473 $this->respcondition->setContinue($value);
476 $this->respcondition->setTitle($value);
499 case "questestinterop":
500 $this->hasRootElement =
true;
508 $this->in_presentation =
true;
511 case "response_label":
514 case "render_choice":
517 case "render_hotspot":
541 case "resprocessing":
545 $this->solutionhint[
'points'] = (float) $a_attribs[
'points'];
555 switch ($this->parser_mode) {
556 case self::IL_MO_PARSE_QTI:
559 case self::IL_MO_VERIFY_QTI:
571 if ($this->do_nothing && strtolower($a_name) !==
"item") {
574 switch (strtolower($a_name)) {
576 if (is_object($this->tst_object)) {
577 $this->tst_object->fromXML($this->
assessment, $this->mappings);
579 $this->in_assessment =
false;
581 case "assessmentcontrol":
582 $this->
assessment->addAssessmentcontrol($this->assessmentcontrol);
583 $this->assessmentcontrol = null;
586 if (strtolower($this->
getParent($a_xml_parser)) ===
"assessment") {
587 $this->
assessment->addObjectives($this->objectives);
589 $this->in_objectives =
false;
591 case 'presentation_material':
592 $this->
assessment->setPresentationMaterial($this->prensentation_material);
593 $this->in_prensentation_material =
false;
596 $this->in_itemmetadata =
false;
598 case "qtimetadatafield":
600 switch ($this->metadata[
"label"]) {
601 case "ILIAS_VERSION":
602 if ($this->item !== null) {
603 $this->item->setIliasSourceVersion(
609 if ($this->item !== null) {
610 $this->item->setQuestiontype($this->metadata[
"entry"]);
614 if ($this->item !== null) {
615 $this->item->setAuthor($this->metadata[
"entry"]);
619 if ($this->item !== null) {
620 $this->item->addMetadata($this->metadata);
624 if ($this->in_assessment) {
625 $this->
assessment->addQtiMetadata($this->metadata);
627 $this->metadata = [
"label" =>
"",
"entry" =>
""];
633 if (count($this->flow_mat)) {
634 $flow_mat = array_pop($this->flow_mat);
635 if (count($this->flow_mat)) {
636 $this->flow_mat[count($this->flow_mat) - 1]->addFlowMat($flow_mat);
637 } elseif ($this->in_prensentation_material) {
638 $this->prensentation_material->addFlowMat($flow_mat);
639 } elseif ($this->itemfeedback != null) {
640 $this->itemfeedback->addFlowMat($flow_mat);
641 } elseif ($this->response_label != null) {
642 $this->response_label->addFlow_mat($flow_mat);
647 if ($this->item != null) {
648 if ($this->itemfeedback != null) {
649 $this->item->addItemfeedback($this->itemfeedback);
652 $this->itemfeedback = null;
654 case "displayfeedback":
655 if ($this->respcondition != null) {
656 if ($this->displayfeedback != null) {
657 $this->respcondition->addDisplayfeedback($this->displayfeedback);
660 $this->displayfeedback = null;
663 if ($this->respcondition !== null) {
664 if ($this->setvar != null) {
665 $this->respcondition->addSetvar($this->setvar);
668 $this->setvar = null;
671 if ($this->respcondition !== null) {
672 $this->respcondition->setConditionvar($this->conditionvar);
674 $this->conditionvar = null;
684 if ($this->conditionvar != null) {
685 if ($this->responsevar != null) {
686 $this->conditionvar->addResponseVar($this->responsevar);
689 $this->responsevar = null;
691 case "respcondition":
692 if ($this->resprocessing != null) {
693 $this->resprocessing->addRespcondition($this->respcondition);
695 $this->respcondition = null;
698 if ($this->resprocessing != null) {
699 $this->resprocessing->setOutcomes($this->outcomes);
701 $this->outcomes = null;
704 if ($this->outcomes != null) {
705 $this->outcomes->addDecvar($this->decvar);
707 $this->decvar = null;
710 $this->in_presentation =
false;
711 if ($this->presentation != null && $this->item != null) {
712 $this->item->setPresentation($this->presentation);
714 $this->presentation = null;
716 case "response_label":
717 if ($this->render_type != null) {
718 $this->render_type->addResponseLabel($this->response_label);
719 $this->response_label = null;
722 case "render_choice":
723 case "render_hotspot":
725 if ($this->in_response) {
726 if ($this->response != null) {
727 if ($this->render_type != null) {
728 $this->response->setRenderType($this->render_type);
729 $this->render_type = null;
740 if ($this->presentation != null) {
741 if ($this->response != null) {
742 $this->presentation->addResponse($this->response);
743 if ($this->item != null) {
744 $this->item->addPresentationitem($this->response);
748 $this->response = null;
749 $this->in_response =
false;
752 if ($this->do_nothing) {
753 $this->do_nothing =
false;
762 $qt = $this->item->determineQuestionType();
763 $presentation = $this->item->getPresentation();
769 $question =
new $qt();
770 $fbt = str_replace(
'ass',
'ilAss', $qt) .
'Feedback';
771 $question->feedbackOBJ =
new $fbt(
777 $this->import_mapping = $question->fromXML(
782 $this->question_counter,
783 $this->import_mapping,
787 $this->solutionhints = [];
789 $this->numImportedItems++;
793 if ($this->material) {
794 $mat = $this->material->getMaterial(0);
795 if (!is_array($mat)) {
796 $this->material = null;
799 if ($mat[
"type"] ===
"mattext" && $mat[
"material"]->getLabel() ===
"suggested_solution") {
800 $this->item->addSuggestedSolution($mat[
"material"], $this->gap_index);
802 if ($this->in_objectives) {
803 $this->objectives->addMaterial($this->material);
804 } elseif ($this->render_type != null && strtolower($this->
getParent($a_xml_parser)) ===
"render_hotspot") {
805 $this->render_type->addMaterial($this->material);
806 } elseif (count($this->flow_mat) && strtolower($this->
getParent($a_xml_parser)) ===
"flow_mat") {
807 $this->flow_mat[count($this->flow_mat) - 1]->addMaterial($this->material);
808 } elseif ($this->itemfeedback != null) {
809 $this->itemfeedback->addMaterial($this->material);
810 } elseif ($this->response_label != null) {
811 $this->response_label->addMaterial($this->material);
812 } elseif ($this->response != null) {
813 if ($this->response->hasRendering()) {
814 $this->response->setMaterial2($this->material);
816 $this->response->setMaterial1($this->material);
818 } elseif (($this->in_presentation) && (!$this->in_response)) {
819 if (!is_object($this->item->getQuestiontext())) {
820 $this->item->setQuestiontext($this->material);
822 $this->presentation->addMaterial($this->material);
823 } elseif ($this->presentation != null) {
824 $this->presentation->addMaterial($this->material);
825 if ($this->item != null) {
826 $this->item->addPresentationitem($this->material);
830 $this->material = null;
838 if ($this->
virusDetected($this->matimage->getRawContent())) {
843 $matImageSecurity->sanitizeLabel();
847 if (!$matImageSecurity->validate()) {
851 $this->material->addMatimage($this->matimage);
852 $this->matimage = null;
858 $this->mattext->setContent(
'<br />');
859 $this->material->addMattext($this->mattext);
860 $this->mattext = null;
862 case "resprocessing":
863 if ($this->item != null) {
864 $this->item->addResprocessing($this->resprocessing);
866 $this->resprocessing = null;
869 if ($this->material != null) {
870 $this->material->addMattext($this->mattext);
872 $this->mattext = null;
875 if ($this->material != null) {
876 $this->material->addMatapplet($this->matapplet);
878 $this->matapplet = null;
886 $this->depth[$a_xml_parser] -= 1;
894 switch ($this->parser_mode) {
895 case self::IL_MO_PARSE_QTI:
898 case self::IL_MO_VERIFY_QTI:
909 if ($this->do_nothing) {
912 $this->characterbuffer .= $a_data;
914 switch ($this->qti_element) {
916 $this->metadata[
"label"] = $a_data;
919 $this->metadata[
"entry"] = $a_data;
921 case "response_label":
922 if ($this->response_label != null) {
923 $this->response_label->setContent($a_data);
927 if ($this->setvar != null) {
928 $this->setvar->setContent($a_data);
931 case "displayfeedback":
932 if ($this->displayfeedback != null) {
933 $this->displayfeedback->setContent($a_data);
944 if ($this->responsevar != null) {
945 $this->responsevar->setContent($a_data);
949 if (strlen($a_data)) {
950 if ($this->decvar != null) {
951 $this->decvar->setContent($a_data);
956 if ($this->mattext != null) {
957 $this->mattext->setContent($a_data);
961 if ($this->matapplet != null) {
962 $this->matapplet->setContent($a_data);
966 if ($this->matimage != null) {
967 $this->matimage->setContent($a_data);
971 switch ($this->
getParent($a_xml_parser)) {
979 $this->item->setDuration($a_data);
984 switch ($this->
getParent($a_xml_parser)) {
986 $this->item->setComment($a_data);
996 $this->sametag =
true;
1005 $this->qti_element = $a_name;
1007 switch (strtolower($a_name)) {
1010 $this->in_assessment =
true;
1011 foreach ($a_attribs as $attribute => $value) {
1012 switch (strtolower($attribute)) {
1022 case "questestinterop":
1023 $this->verifyroot =
true;
1025 case "qtimetadatafield":
1026 $this->metadata = [
"label" =>
"",
"entry" =>
""];
1027 $this->verifymetadatafield = 1;
1030 $this->verifyfieldlabeltext =
"";
1031 if ($this->verifymetadatafield == 1) {
1032 $this->verifyfieldlabel = 1;
1036 $this->verifyfieldentrytext =
"";
1037 if ($this->verifymetadatafield == 1) {
1038 $this->verifyfieldentry = 1;
1043 foreach ($a_attribs as $attribute => $value) {
1044 switch (strtolower($attribute)) {
1050 $this->founditems[] = [
"title" =>
"$title",
"type" =>
"",
"ident" => $a_attribs[
"ident"]];
1052 case "response_lid":
1053 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1055 foreach ($a_attribs as $attribute => $value) {
1056 switch (strtolower($attribute)) {
1057 case "rcardinality":
1058 switch (strtolower($value)) {
1076 $this->solutionhint = array_map(
'intval', $a_attribs);
1077 $this->solutionhint[
'txt'] =
'';
1079 case "response_str":
1080 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1082 foreach ($a_attribs as $attribute => $value) {
1083 switch (strtolower($attribute)) {
1084 case "rcardinality":
1085 switch (strtolower($value)) {
1099 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1103 case "response_num":
1104 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1108 case "response_grp":
1109 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1115 $this->verifyqticomment = 1;
1117 case "presentation":
1118 foreach ($a_attribs as $attribute => $value) {
1119 switch (strtolower($attribute)) {
1121 $this->founditems[count($this->founditems) - 1][
"title"] = $value;
1134 switch (strtolower($a_name)) {
1136 foreach ($this->
assessment->qtimetadata as $metaField) {
1137 if ($metaField[
'label'] ==
'question_set_type') {
1142 if ($metaField[
'label'] ==
'random_test') {
1143 if ($metaField[
'entry'] == 1) {
1151 $this->in_assessment =
false;
1155 $this->verifyqticomment = 0;
1157 case "qtimetadatafield":
1158 $this->verifymetadatafield = 0;
1159 if ($this->verifyfieldlabeltext ===
"QUESTIONTYPE") {
1162 if ($this->in_assessment) {
1163 $this->
assessment->addQtiMetadata($this->metadata);
1165 $this->metadata = [
"label" =>
"",
"entry" =>
""];
1168 $this->verifyfieldlabel = 0;
1171 $this->verifyfieldentry = 0;
1181 if ($this->verifyqticomment == 1) {
1182 if (preg_match(
"/Questiontype\=(.*)/", $a_data, $matches)) {
1183 if (count($this->founditems)) {
1184 $this->founditems[count($this->founditems) - 1][
"type"] = $matches[1];
1187 } elseif ($this->verifyfieldlabel == 1) {
1188 $this->verifyfieldlabeltext = $a_data;
1189 } elseif ($this->verifyfieldentry == 1) {
1190 $this->verifyfieldentrytext = $a_data;
1193 switch ($this->qti_element) {
1195 $this->metadata[
"label"] = $a_data;
1198 $this->metadata[
"entry"] = $a_data;
1225 $questionIdMapping = [];
1228 $oldQuestionId = substr($k, strpos($k,
'qst_') + strlen(
'qst_'));
1229 $newQuestionId = $v[
'test'];
1231 $questionIdMapping[$oldQuestionId] = $newQuestionId;
1234 return $questionIdMapping;
1241 parent::setXMLContent($a_xml_content);
1249 $xmlContent = file_get_contents($this->xml_file);
1251 file_put_contents($this->xml_file, $xmlContent);
1253 return parent::openXMLFile();
1260 if (preg_match(
'/^(\d+\.\d+\.\d+)$/', $versionDateString, $matches)) {
1271 if (preg_match(
'/^il_(\d+?)_qst_\d+$/', $itemIdent, $matches)) {
1288 for ($i = 0x00, $max = 0x08; $i <= $max; $i += 0x01) {
1289 $needles[] =
"&#{$i};";
1291 for ($i = 0x0b, $max = 0x0c; $i <= $max; $i += 0x01) {
1292 $needles[] =
"&#{$i};";
1294 for ($i = 0x0e, $max = 0x1f; $i <= $max; $i += 0x01) {
1295 $needles[] =
"&#{$i};";
1297 for ($i = 0xd800, $max = 0xdfff; $i <= $max; $i += 0x0001) {
1298 $needles[] =
"&#{$i};";
1300 for ($i = 0xfffe, $max = 0xffff; $i <= $max; $i += 0x0001) {
1301 $needles[] =
"&#{$i};";
1303 $reg =
'/(' . implode(
'|', $needles) .
')/';
1304 $xmlContent = preg_replace($reg,
'', $xmlContent);
1316 if (!$this->material) {
1320 if (!$this->matimage) {
1335 return $vs->scanBuffer($buffer);
1341 $this->in_assessment =
true;
1342 foreach ($a_attribs as $attribute => $value) {
1343 switch (strtolower($attribute)) {
1357 foreach ($a_attribs as $attribute => $value) {
1358 switch (strtolower($attribute)) {
1359 case "solutionswitch":
1360 $this->assessmentcontrol->setSolutionswitch($value);
1363 $this->assessmentcontrol->setHintswitch($value);
1365 case "feedbackswitch":
1366 $this->assessmentcontrol->setFeedbackswitch($value);
1375 foreach ($a_attribs as $attribute => $value) {
1376 switch (strtolower($attribute)) {
1378 $this->itemfeedback->setIdent($value);
1381 $this->itemfeedback->setView($value);
1390 foreach ($a_attribs as $attribute => $value) {
1391 switch (strtolower($attribute)) {
1392 case "feedbacktype":
1393 $this->displayfeedback->setFeedbacktype($value);
1396 $this->displayfeedback->setLinkrefid($value);
1405 foreach ($a_attribs as $attribute => $value) {
1406 switch (strtolower($attribute)) {
1408 $this->setvar->setAction($value);
1411 $this->setvar->setVarname($value);
1420 foreach ($a_attribs as $attribute => $value) {
1421 switch (strtolower($attribute)) {
1423 $this->responsevar->setCase($value);
1426 $this->responsevar->setRespident($value);
1429 $this->responsevar->setIndex($value);
1438 switch (strtolower($a_name)) {
1439 case "response_lid":
1445 case "response_str":
1448 case "response_num":
1451 case "response_grp":
1455 $this->in_response =
true;
1457 $this->response->setFlow($this->flow);
1458 foreach ($a_attribs as $attribute => $value) {
1459 switch (strtolower($attribute)) {
1461 $this->response->setIdent($value);
1464 $this->response->setRTiming($value);
1466 case "rcardinality":
1467 $this->response->setRCardinality($value);
1470 $this->response->setNumtype($value);
1478 $this->gap_index = 0;
1479 $this->item = $this->items[] =
new ilQTIItem();
1480 foreach ($a_attribs as $attribute => $value) {
1481 switch (strtolower($attribute)) {
1483 $this->item->setIdent($value);
1484 $this->item->setIliasSourceNic(
1488 $this->do_nothing =
true;
1489 } elseif (count($this->import_idents) > 0) {
1490 if (!in_array($value, $this->import_idents)) {
1491 $this->do_nothing =
true;
1496 $this->item->setTitle($value);
1499 $this->item->setMaxattempts($value);
1508 foreach ($a_attribs as $attribute => $value) {
1509 switch (strtolower($attribute)) {
1511 $this->resprocessing->setScoremodel($value);
1519 if (!$this->in_response) {
1523 foreach ($a_attribs as $attribute => $value) {
1524 switch (strtolower($attribute)) {
1526 $this->render_type->setEncoding($value);
1529 $this->render_type->setFibtype($value);
1532 $this->render_type->setRows($value);
1535 $this->render_type->setMaxchars($value);
1538 $this->render_type->setPrompt($value);
1541 $this->render_type->setColumns($value);
1544 $this->render_type->setCharset($value);
1547 $this->render_type->setMaxnumber($value);
1550 $this->render_type->setMinnumber($value);
1558 if (!$this->in_response) {
1562 foreach ($a_attribs as $attribute => $value) {
1563 switch (strtolower($attribute)) {
1565 $this->render_type->setShowdraw($value);
1568 $this->render_type->setMinnumber($value);
1571 $this->render_type->setMaxnumber($value);
1579 if (!$this->in_response) {
1583 foreach ($a_attribs as $attribute => $value) {
1584 switch (strtolower($attribute)) {
1586 $this->render_type->setShuffle($value);
1589 $this->render_type->setMinnumber($value);
1592 $this->render_type->setMaxnumber($value);
1600 if ($this->render_type == null) {
1604 foreach ($a_attribs as $attribute => $value) {
1605 switch (strtolower($attribute)) {
1607 $this->response_label->setRshuffle($value);
1610 $this->response_label->setRarea($value);
1613 $this->response_label->setRrange($value);
1616 $this->response_label->setLabelrefid($value);
1619 $this->response_label->setIdent($value);
1622 $this->response_label->setMatchGroup($value);
1625 $this->response_label->setMatchMax($value);
1634 foreach ($a_attribs as $attribute => $value) {
1635 switch (strtolower($attribute)) {
1637 $this->matapplet->setLabel($value);
1640 $this->matapplet->setUri($value);
1643 $this->matapplet->setY0($value);
1646 $this->matapplet->setHeight($value);
1649 $this->matapplet->setWidth($value);
1652 $this->matapplet->setX0($value);
1655 $this->matapplet->setEmbedded($value);
1658 $this->matapplet->setEntityref($value);
1667 foreach ($a_attribs as $attribute => $value) {
1668 switch (strtolower($attribute)) {
1670 $this->mattext->setTexttype($value);
1673 $this->mattext->setLabel($value);
1676 $this->mattext->setCharset($value);
1679 $this->mattext->setUri($value);
1682 $this->mattext->setXmlspace($value);
1685 $this->mattext->setXmllang($value);
1688 $this->mattext->setEntityref($value);
1691 $this->mattext->setHeight($value);
1694 $this->mattext->setWidth($value);
1697 $this->mattext->setX0($value);
1700 $this->mattext->setY0($value);
1709 $this->material->setFlow($this->flow);
1710 foreach ($a_attribs as $attribute => $value) {
1711 switch (strtolower($attribute)) {
1713 $this->material->setLabel($value);
1722 foreach ($a_attribs as $attribute => $value) {
1723 switch (strtolower($attribute)) {
1725 $this->matimage->setImagetype($value);
1728 $this->matimage->setLabel($value);
1731 $this->matimage->setHeight($value);
1734 $this->matimage->setWidth($value);
1737 $this->matimage->setUri($value);
1740 $this->matimage->setEmbedded($value);
1743 $this->matimage->setX0($value);
1746 $this->matimage->setY0($value);
1749 $this->matimage->setEntityref($value);
1753 if (!$this->matimage->getEmbedded() && strlen($this->matimage->getUri())) {
1754 $img_string = @file_get_contents(dirname($this->xml_file) .
'/' . $this->matimage->getUri());
1756 if (is_string($img_string)) {
1757 $this->matimage->setContent($img_string);
1765 foreach ($a_attribs as $attribute => $value) {
1766 switch (strtolower($attribute)) {
1768 $this->decvar->setVarname($value);
1771 $this->decvar->setVartype($value);
1774 $this->decvar->setDefaultval($value);
1777 $this->decvar->setMinvalue($value);
1780 $this->decvar->setMaxvalue($value);
1783 $this->decvar->setMembers($value);
1786 $this->decvar->setCutvalue($value);
1797 $parser = xml_parser_create();
1798 $is_resource = is_resource($parser);
1799 xml_parser_free($parser);
1801 return $is_resource ? [] :
new SplObjectStorage();
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setHandlers($a_xml_parser)
set event handler should be overwritten by inherited class private
ilQTIObjectives $objectives
renderHotspotBeginTag(array $a_attribs)
string $verifyfieldlabeltext
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
itemBeginTag(array $a_attribs)
matTextBeginTag(array $a_attribs)
ilQTIRespcondition $respcondition
cleanInvalidXmlChars(string $xmlContent)
ilQTIAssessmentcontrol $assessmentcontrol
handlerVerifyCharacterData($a_xml_parser, string $a_data)
const QUESTION_SET_TYPE_RANDOM
assessmentBeginTag(array $a_attribs)
decVarBeginTag(array $a_attribs)
const RESPONSEVAR_SUBSTRING
ilQTIPresentationMaterial $prensentation_material
itemFeedbackBeginTag(array $a_attribs)
handlerParseBeginTag($a_xml_parser, string $a_name, array $a_attribs)
setXMLContent(string $a_xml_content)
renderChoiceBeginTag(array $a_attribs)
ilQTIResprocessing $resprocessing
resprocessingBeginTag(array $a_attribs)
ilQTIAssessment $assessment
termsAndDefinitionsBeginTag(string $a_name, array $a_attribs)
setVarBeginTag(array $a_attribs)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
matImageBeginTag(array $a_attribs)
ILIAS TestQuestionPool QuestionFilesService $questionfiles
displayFeedbackBeginTag(array $a_attribs)
static isImportable($questionTypeTag)
bool $in_prensentation_material
assessmentControlBeginTag(array $a_attribs)
fetchSourceNicFromItemIdent(string $itemIdent)
ilQTIItemfeedback $itemfeedback
handlerParseEndTag($a_xml_parser, string $a_name)
NotOptimalIfConditionsInspection
setIgnoreItemsEnabled(bool $ignoreItemsEnabled)
handlerBeginTag($a_xml_parser, string $a_name, array $a_attribs)
ilQTIResponseLabel $response_label
responseLabelBeginTag(array $a_attribs)
handlerVerifyEndTag($a_xml_parser, string $a_name)
ilQTIPresentation $presentation
const QT_MULTIPLE_CHOICE_SR
virusDetected(string $buffer)
fetchNumericVersionFromVersionDateString(string $versionDateString)
matAppletBeginTag(array $a_attribs)
setQuestionSetType(string $questionSetType)
handlerVerifyBeginTag($a_xml_parser, string $a_name, array $a_attribs)
handlerCharacterData($a_xml_parser, string $a_data)
__construct(?string $a_xml_file, int $a_mode=self::IL_MO_PARSE_QTI, int $a_qpl_id=0, $a_import_idents='', array $mappings=[])
const QT_MULTIPLE_CHOICE_MR
ilQTIResponseVar $responsevar
ilQTIConditionvar $conditionvar
string $verifyfieldentrytext
ilQTIDisplayfeedback $displayfeedback
getImportMapping()
Get array of new created questions for import id.
const QUESTION_SET_TYPE_FIXED
varEqualBeginTag(array $a_attribs)
renderFibBeginTag(array $a_attribs)
handlerEndTag($a_xml_parser, string $a_name)
ilQTIMatapplet $matapplet
handlerParseCharacterData($a_xml_parser, string $a_data)
materialBeginTag(array $a_attribs)
setTestObject(ilObjTest $a_tst_object)