19 declare(strict_types=1);
182 private array
$metadata = [
"label" =>
"",
"entry" =>
""];
188 public function __construct(?
string $a_xml_file,
int $a_mode = self::IL_MO_PARSE_QTI,
int $a_qpl_id = 0, $a_import_idents =
"")
192 $this->parser_mode = $a_mode;
196 $this->qpl_id = $a_qpl_id;
198 if (is_array($a_import_idents)) {
199 $this->import_idents = &$a_import_idents;
227 $this->tst_object = $a_tst_object;
228 $this->tst_id = $this->tst_object->
getId();
245 xml_set_object($a_xml_parser, $this);
246 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
247 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
252 $this->question_counter = 1;
253 parent::startParsing();
261 if ($this->depth[$a_xml_parser] > 0) {
262 return $this->path[$this->depth[$a_xml_parser] - 1];
272 public function handlerBeginTag($a_xml_parser,
string $a_name, array $a_attribs): void
274 switch ($this->parser_mode) {
275 case self::IL_MO_PARSE_QTI:
278 case self::IL_MO_VERIFY_QTI:
290 if ($this->do_nothing) {
293 $this->sametag =
false;
294 $this->characterbuffer =
"";
295 $this->depth[$a_xml_parser] = ($this->depth[$a_xml_parser] ?? 0) + 1;
296 $this->path[$this->depth[$a_xml_parser]] = strtolower($a_name);
297 $this->qti_element = $a_name;
299 switch (strtolower($a_name)) {
303 case "assessmentcontrol":
308 $this->in_objectives =
true;
310 case 'presentation_material':
312 $this->in_prensentation_material =
true;
318 $this->in_itemmetadata =
true;
320 case "qtimetadatafield":
321 $this->metadata = [
"label" =>
"",
"entry" =>
""];
332 case "displayfeedback":
342 if ($this->conditionvar != null) {
343 $this->conditionvar->addNot();
347 if ($this->conditionvar != null) {
348 $this->conditionvar->addAnd();
352 if ($this->conditionvar != null) {
353 $this->conditionvar->addOr();
361 foreach ($a_attribs as $attribute => $value) {
362 switch (strtolower($attribute)) {
364 $this->responsevar->setRespident($value);
367 $this->responsevar->setIndex($value);
374 foreach ($a_attribs as $attribute => $value) {
375 switch (strtolower($attribute)) {
377 $this->responsevar->setRespident($value);
380 $this->responsevar->setIndex($value);
387 foreach ($a_attribs as $attribute => $value) {
388 switch (strtolower($attribute)) {
390 $this->responsevar->setRespident($value);
393 $this->responsevar->setIndex($value);
400 foreach ($a_attribs as $attribute => $value) {
401 switch (strtolower($attribute)) {
403 $this->responsevar->setRespident($value);
406 $this->responsevar->setIndex($value);
413 foreach ($a_attribs as $attribute => $value) {
414 switch (strtolower($attribute)) {
416 $this->responsevar->setRespident($value);
419 $this->responsevar->setSetmatch($value);
422 $this->responsevar->setIndex($value);
429 foreach ($a_attribs as $attribute => $value) {
430 switch (strtolower($attribute)) {
432 $this->responsevar->setRespident($value);
435 $this->responsevar->setAreatype($value);
438 $this->responsevar->setIndex($value);
445 foreach ($a_attribs as $attribute => $value) {
446 switch (strtolower($attribute)) {
448 $this->responsevar->setCase($value);
451 $this->responsevar->setRespident($value);
454 $this->responsevar->setIndex($value);
459 case "respcondition":
461 foreach ($a_attribs as $attribute => $value) {
462 switch (strtolower($attribute)) {
464 $this->respcondition->setContinue($value);
467 $this->respcondition->setTitle($value);
490 case "questestinterop":
491 $this->hasRootElement =
true;
499 $this->in_presentation =
true;
502 case "response_label":
505 case "render_choice":
508 case "render_hotspot":
532 case "resprocessing":
543 switch ($this->parser_mode) {
544 case self::IL_MO_PARSE_QTI:
547 case self::IL_MO_VERIFY_QTI:
559 if ($this->do_nothing && strtolower($a_name) !==
"item") {
562 switch (strtolower($a_name)) {
564 if (is_object($this->tst_object)) {
565 $this->tst_object->fromXML($this->
assessment);
567 $this->in_assessment =
false;
569 case "assessmentcontrol":
570 $this->
assessment->addAssessmentcontrol($this->assessmentcontrol);
571 $this->assessmentcontrol = null;
574 if (strtolower($this->
getParent($a_xml_parser)) ===
"assessment") {
575 $this->
assessment->addObjectives($this->objectives);
577 $this->in_objectives =
false;
579 case 'presentation_material':
580 $this->
assessment->setPresentationMaterial($this->prensentation_material);
581 $this->in_prensentation_material =
false;
584 $this->in_itemmetadata =
false;
586 case "qtimetadatafield":
588 switch ($this->metadata[
"label"]) {
589 case "ILIAS_VERSION":
590 if ($this->item != null) {
591 $this->item->setIliasSourceVersion(
597 if ($this->item != null) {
598 $this->item->setQuestiontype($this->metadata[
"entry"]);
602 if ($this->item != null) {
603 $this->item->setAuthor($this->metadata[
"entry"]);
607 if ($this->item != null) {
608 $this->item->addMetadata($this->metadata);
612 if ($this->in_assessment) {
613 $this->
assessment->addQtiMetadata($this->metadata);
615 $this->metadata = [
"label" =>
"",
"entry" =>
""];
621 if (count($this->flow_mat)) {
622 $flow_mat = array_pop($this->flow_mat);
623 if (count($this->flow_mat)) {
624 $this->flow_mat[count($this->flow_mat) - 1]->addFlowMat($flow_mat);
625 } elseif ($this->in_prensentation_material) {
626 $this->prensentation_material->addFlowMat($flow_mat);
627 } elseif ($this->itemfeedback != null) {
628 $this->itemfeedback->addFlowMat($flow_mat);
629 } elseif ($this->response_label != null) {
630 $this->response_label->addFlow_mat($flow_mat);
635 if ($this->item != null) {
636 if ($this->itemfeedback != null) {
637 $this->item->addItemfeedback($this->itemfeedback);
640 $this->itemfeedback = null;
642 case "displayfeedback":
643 if ($this->respcondition != null) {
644 if ($this->displayfeedback != null) {
645 $this->respcondition->addDisplayfeedback($this->displayfeedback);
648 $this->displayfeedback = null;
651 if ($this->respcondition != null) {
652 if ($this->setvar != null) {
653 $this->respcondition->addSetvar($this->setvar);
656 $this->setvar = null;
659 if ($this->respcondition != null) {
660 $this->respcondition->setConditionvar($this->conditionvar);
662 $this->conditionvar = null;
672 if ($this->conditionvar != null) {
673 if ($this->responsevar != null) {
674 $this->conditionvar->addResponseVar($this->responsevar);
677 $this->responsevar = null;
679 case "respcondition":
680 if ($this->resprocessing != null) {
681 $this->resprocessing->addRespcondition($this->respcondition);
683 $this->respcondition = null;
686 if ($this->resprocessing != null) {
687 $this->resprocessing->setOutcomes($this->outcomes);
689 $this->outcomes = null;
692 if ($this->outcomes != null) {
693 $this->outcomes->addDecvar($this->decvar);
695 $this->decvar = null;
698 $this->in_presentation =
false;
699 if ($this->presentation != null && $this->item != null) {
700 $this->item->setPresentation($this->presentation);
702 $this->presentation = null;
704 case "response_label":
705 if ($this->render_type != null) {
706 $this->render_type->addResponseLabel($this->response_label);
707 $this->response_label = null;
710 case "render_choice":
711 case "render_hotspot":
713 if ($this->in_response) {
714 if ($this->response != null) {
715 if ($this->render_type != null) {
716 $this->response->setRenderType($this->render_type);
717 $this->render_type = null;
728 if ($this->presentation != null) {
729 if ($this->response != null) {
730 $this->presentation->addResponse($this->response);
731 if ($this->item != null) {
732 $this->item->addPresentationitem($this->response);
736 $this->response = null;
737 $this->in_response =
false;
740 if ($this->do_nothing) {
741 $this->do_nothing =
false;
744 if ((
string) $this->item->getQuestionType() !==
'') {
757 $qt = $this->item->determineQuestionType();
758 $presentation = $this->item->getPresentation();
764 $question =
new $qt();
765 $fbt = str_replace(
'ass',
'ilAss', $qt) .
'Feedback';
766 $question->feedbackOBJ =
new $fbt(
772 $this->import_mapping = $question->fromXML(
777 $this->question_counter,
778 $this->import_mapping,
782 $this->solutionhints = [];
784 $this->numImportedItems++;
788 if ($this->material) {
789 $mat = $this->material->getMaterial(0);
790 if (!is_array($mat)) {
791 $this->material = null;
794 if ($mat[
"type"] ===
"mattext" && $mat[
"material"]->getLabel() ===
"suggested_solution") {
795 $this->item->addSuggestedSolution($mat[
"material"], $this->gap_index);
797 if ($this->in_objectives) {
798 $this->objectives->addMaterial($this->material);
799 } elseif ($this->render_type != null && strtolower($this->
getParent($a_xml_parser)) ===
"render_hotspot") {
800 $this->render_type->addMaterial($this->material);
801 } elseif (count($this->flow_mat) && strtolower($this->
getParent($a_xml_parser)) ===
"flow_mat") {
802 $this->flow_mat[count($this->flow_mat) - 1]->addMaterial($this->material);
803 } elseif ($this->itemfeedback != null) {
804 $this->itemfeedback->addMaterial($this->material);
805 } elseif ($this->response_label != null) {
806 $this->response_label->addMaterial($this->material);
807 } elseif ($this->response != null) {
808 if ($this->response->hasRendering()) {
809 $this->response->setMaterial2($this->material);
811 $this->response->setMaterial1($this->material);
813 } elseif (($this->in_presentation) && (!$this->in_response)) {
814 if (!is_object($this->item->getQuestiontext())) {
815 $this->item->setQuestiontext($this->material);
817 $this->presentation->addMaterial($this->material);
818 } elseif ($this->presentation != null) {
819 $this->presentation->addMaterial($this->material);
820 if ($this->item != null) {
821 $this->item->addPresentationitem($this->material);
825 $this->material = null;
833 if ($this->
virusDetected($this->matimage->getRawContent())) {
838 $matImageSecurity->sanitizeLabel();
842 if (!$matImageSecurity->validate()) {
846 $this->material->addMatimage($this->matimage);
847 $this->matimage = null;
853 $this->mattext->setContent(
'<br />');
854 $this->material->addMattext($this->mattext);
855 $this->mattext = null;
857 case "resprocessing":
858 if ($this->item != null) {
859 $this->item->addResprocessing($this->resprocessing);
861 $this->resprocessing = null;
864 if ($this->material != null) {
865 $this->material->addMattext($this->mattext);
867 $this->mattext = null;
870 if ($this->material != null) {
871 $this->material->addMatapplet($this->matapplet);
873 $this->matapplet = null;
881 $this->depth[$a_xml_parser] -= 1;
889 switch ($this->parser_mode) {
890 case self::IL_MO_PARSE_QTI:
893 case self::IL_MO_VERIFY_QTI:
904 if ($this->do_nothing) {
907 $this->characterbuffer .= $a_data;
909 switch ($this->qti_element) {
911 $this->metadata[
"label"] = $a_data;
914 $this->metadata[
"entry"] = $a_data;
916 case "response_label":
917 if ($this->response_label != null) {
918 $this->response_label->setContent($a_data);
922 if ($this->setvar != null) {
923 $this->setvar->setContent($a_data);
926 case "displayfeedback":
927 if ($this->displayfeedback != null) {
928 $this->displayfeedback->setContent($a_data);
939 if ($this->responsevar != null) {
940 $this->responsevar->setContent($a_data);
944 if (strlen($a_data)) {
945 if ($this->decvar != null) {
946 $this->decvar->setContent($a_data);
951 if ($this->mattext != null) {
952 $this->mattext->setContent($a_data);
956 if ($this->matapplet != null) {
957 $this->matapplet->setContent($a_data);
961 if ($this->matimage != null) {
962 $this->matimage->setContent($a_data);
966 switch ($this->
getParent($a_xml_parser)) {
974 $this->item->setDuration($a_data);
979 switch ($this->
getParent($a_xml_parser)) {
981 $this->item->setComment($a_data);
991 $this->sametag =
true;
1000 $this->qti_element = $a_name;
1002 switch (strtolower($a_name)) {
1005 $this->in_assessment =
true;
1006 foreach ($a_attribs as $attribute => $value) {
1007 switch (strtolower($attribute)) {
1017 case "questestinterop":
1018 $this->verifyroot =
true;
1020 case "qtimetadatafield":
1021 $this->metadata = [
"label" =>
"",
"entry" =>
""];
1022 $this->verifymetadatafield = 1;
1025 $this->verifyfieldlabeltext =
"";
1026 if ($this->verifymetadatafield == 1) {
1027 $this->verifyfieldlabel = 1;
1031 $this->verifyfieldentrytext =
"";
1032 if ($this->verifymetadatafield == 1) {
1033 $this->verifyfieldentry = 1;
1038 foreach ($a_attribs as $attribute => $value) {
1039 switch (strtolower($attribute)) {
1045 $this->founditems[] = [
"title" =>
"$title",
"type" =>
"",
"ident" => $a_attribs[
"ident"]];
1047 case "response_lid":
1048 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1050 foreach ($a_attribs as $attribute => $value) {
1051 switch (strtolower($attribute)) {
1052 case "rcardinality":
1053 switch (strtolower($value)) {
1071 $this->solutionhint = array_map(
'intval', $a_attribs);
1072 $this->solutionhint[
'txt'] =
'';
1074 case "response_str":
1075 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1077 foreach ($a_attribs as $attribute => $value) {
1078 switch (strtolower($attribute)) {
1079 case "rcardinality":
1080 switch (strtolower($value)) {
1094 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1098 case "response_num":
1099 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1103 case "response_grp":
1104 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1110 $this->verifyqticomment = 1;
1112 case "presentation":
1113 foreach ($a_attribs as $attribute => $value) {
1114 switch (strtolower($attribute)) {
1116 $this->founditems[count($this->founditems) - 1][
"title"] = $value;
1130 switch (strtolower($a_name)) {
1132 foreach ($this->
assessment->qtimetadata as $metaField) {
1133 if ($metaField[
'label'] ==
'question_set_type') {
1138 if ($metaField[
'label'] ==
'random_test') {
1139 if ($metaField[
'entry'] == 1) {
1147 $this->in_assessment =
false;
1151 $this->verifyqticomment = 0;
1153 case "qtimetadatafield":
1154 $this->verifymetadatafield = 0;
1155 if ($this->verifyfieldlabeltext ===
"QUESTIONTYPE") {
1158 if ($this->in_assessment) {
1159 $this->
assessment->addQtiMetadata($this->metadata);
1161 $this->metadata = [
"label" =>
"",
"entry" =>
""];
1164 $this->verifyfieldlabel = 0;
1167 $this->verifyfieldentry = 0;
1177 if ($this->verifyqticomment == 1) {
1178 if (preg_match(
"/Questiontype\=(.*)/", $a_data, $matches)) {
1179 if (count($this->founditems)) {
1180 $this->founditems[count($this->founditems) - 1][
"type"] = $matches[1];
1183 } elseif ($this->verifyfieldlabel == 1) {
1184 $this->verifyfieldlabeltext = $a_data;
1185 } elseif ($this->verifyfieldentry == 1) {
1186 $this->verifyfieldentrytext = $a_data;
1189 switch ($this->qti_element) {
1191 $this->metadata[
"label"] = $a_data;
1194 $this->metadata[
"entry"] = $a_data;
1221 $questionIdMapping = [];
1224 $oldQuestionId = substr($k, strpos($k,
'qst_') + strlen(
'qst_'));
1225 $newQuestionId = $v[
'test'];
1227 $questionIdMapping[$oldQuestionId] = $newQuestionId;
1230 return $questionIdMapping;
1237 parent::setXMLContent($a_xml_content);
1245 $xmlContent = file_get_contents($this->xml_file);
1247 file_put_contents($this->xml_file, $xmlContent);
1249 return parent::openXMLFile();
1256 if (preg_match(
'/^(\d+\.\d+(?:\.\d+)?)(?: .*)?$/', $versionDateString, $matches)) {
1267 if (preg_match(
'/^il_(\d+?)_qst_\d+$/', $itemIdent, $matches)) {
1284 for (
$i = 0x00, $max = 0x08;
$i <= $max;
$i += 0x01) {
1285 $needles[] =
"&#{$i};";
1287 for (
$i = 0x0b, $max = 0x0c;
$i <= $max;
$i += 0x01) {
1288 $needles[] =
"&#{$i};";
1290 for (
$i = 0x0e, $max = 0x1f;
$i <= $max;
$i += 0x01) {
1291 $needles[] =
"&#{$i};";
1293 for (
$i = 0xd800, $max = 0xdfff;
$i <= $max;
$i += 0x0001) {
1294 $needles[] =
"&#{$i};";
1296 for (
$i = 0xfffe, $max = 0xffff;
$i <= $max;
$i += 0x0001) {
1297 $needles[] =
"&#{$i};";
1299 $reg =
'/(' . implode(
'|', $needles) .
')/';
1300 $xmlContent = preg_replace($reg,
'', $xmlContent);
1312 if (!$this->material) {
1316 if (!$this->matimage) {
1331 return $vs->scanBuffer($buffer);
1337 $this->in_assessment =
true;
1338 foreach ($a_attribs as $attribute => $value) {
1339 switch (strtolower($attribute)) {
1353 foreach ($a_attribs as $attribute => $value) {
1354 switch (strtolower($attribute)) {
1355 case "solutionswitch":
1356 $this->assessmentcontrol->setSolutionswitch($value);
1359 $this->assessmentcontrol->setHintswitch($value);
1361 case "feedbackswitch":
1362 $this->assessmentcontrol->setFeedbackswitch($value);
1371 foreach ($a_attribs as $attribute => $value) {
1372 switch (strtolower($attribute)) {
1374 $this->itemfeedback->setIdent($value);
1377 $this->itemfeedback->setView($value);
1386 foreach ($a_attribs as $attribute => $value) {
1387 switch (strtolower($attribute)) {
1388 case "feedbacktype":
1389 $this->displayfeedback->setFeedbacktype($value);
1392 $this->displayfeedback->setLinkrefid($value);
1401 foreach ($a_attribs as $attribute => $value) {
1402 switch (strtolower($attribute)) {
1404 $this->setvar->setAction($value);
1407 $this->setvar->setVarname($value);
1416 foreach ($a_attribs as $attribute => $value) {
1417 switch (strtolower($attribute)) {
1419 $this->responsevar->setCase($value);
1422 $this->responsevar->setRespident($value);
1425 $this->responsevar->setIndex($value);
1434 switch (strtolower($a_name)) {
1435 case "response_lid":
1441 case "response_str":
1444 case "response_num":
1447 case "response_grp":
1451 $this->in_response =
true;
1453 $this->response->setFlow($this->flow);
1454 foreach ($a_attribs as $attribute => $value) {
1455 switch (strtolower($attribute)) {
1457 $this->response->setIdent($value);
1460 $this->response->setRTiming($value);
1462 case "rcardinality":
1463 $this->response->setRCardinality($value);
1466 $this->response->setNumtype($value);
1474 $this->gap_index = 0;
1475 $this->item = $this->items[] =
new ilQTIItem();
1476 foreach ($a_attribs as $attribute => $value) {
1477 switch (strtolower($attribute)) {
1479 $this->item->setIdent($value);
1480 $this->item->setIliasSourceNic(
1484 $this->do_nothing =
true;
1485 } elseif (count($this->import_idents) > 0) {
1486 if (!in_array($value, $this->import_idents)) {
1487 $this->do_nothing =
true;
1492 $this->item->setTitle($value);
1495 $this->item->setMaxattempts($value);
1504 foreach ($a_attribs as $attribute => $value) {
1505 switch (strtolower($attribute)) {
1507 $this->resprocessing->setScoremodel($value);
1515 if (!$this->in_response) {
1519 foreach ($a_attribs as $attribute => $value) {
1520 switch (strtolower($attribute)) {
1522 $this->render_type->setEncoding($value);
1525 $this->render_type->setFibtype($value);
1528 $this->render_type->setRows($value);
1531 $this->render_type->setMaxchars($value);
1534 $this->render_type->setPrompt($value);
1537 $this->render_type->setColumns($value);
1540 $this->render_type->setCharset($value);
1543 $this->render_type->setMaxnumber($value);
1546 $this->render_type->setMinnumber($value);
1554 if (!$this->in_response) {
1558 foreach ($a_attribs as $attribute => $value) {
1559 switch (strtolower($attribute)) {
1561 $this->render_type->setShowdraw($value);
1564 $this->render_type->setMinnumber($value);
1567 $this->render_type->setMaxnumber($value);
1575 if (!$this->in_response) {
1579 foreach ($a_attribs as $attribute => $value) {
1580 switch (strtolower($attribute)) {
1582 $this->render_type->setShuffle($value);
1585 $this->render_type->setMinnumber($value);
1588 $this->render_type->setMaxnumber($value);
1596 if ($this->render_type == null) {
1600 foreach ($a_attribs as $attribute => $value) {
1601 switch (strtolower($attribute)) {
1603 $this->response_label->setRshuffle($value);
1606 $this->response_label->setRarea($value);
1609 $this->response_label->setRrange($value);
1612 $this->response_label->setLabelrefid($value);
1615 $this->response_label->setIdent($value);
1618 $this->response_label->setMatchGroup($value);
1621 $this->response_label->setMatchMax($value);
1630 foreach ($a_attribs as $attribute => $value) {
1631 switch (strtolower($attribute)) {
1633 $this->matapplet->setLabel($value);
1636 $this->matapplet->setUri($value);
1639 $this->matapplet->setY0($value);
1642 $this->matapplet->setHeight($value);
1645 $this->matapplet->setWidth($value);
1648 $this->matapplet->setX0($value);
1651 $this->matapplet->setEmbedded($value);
1654 $this->matapplet->setEntityref($value);
1663 foreach ($a_attribs as $attribute => $value) {
1664 switch (strtolower($attribute)) {
1666 $this->mattext->setTexttype($value);
1669 $this->mattext->setLabel($value);
1672 $this->mattext->setCharset($value);
1675 $this->mattext->setUri($value);
1678 $this->mattext->setXmlspace($value);
1681 $this->mattext->setXmllang($value);
1684 $this->mattext->setEntityref($value);
1687 $this->mattext->setHeight($value);
1690 $this->mattext->setWidth($value);
1693 $this->mattext->setX0($value);
1696 $this->mattext->setY0($value);
1705 $this->material->setFlow($this->flow);
1706 foreach ($a_attribs as $attribute => $value) {
1707 switch (strtolower($attribute)) {
1709 $this->material->setLabel($value);
1718 foreach ($a_attribs as $attribute => $value) {
1719 switch (strtolower($attribute)) {
1721 $this->matimage->setImagetype($value);
1724 $this->matimage->setLabel($value);
1727 $this->matimage->setHeight($value);
1730 $this->matimage->setWidth($value);
1733 $this->matimage->setUri($value);
1736 $this->matimage->setEmbedded($value);
1739 $this->matimage->setX0($value);
1742 $this->matimage->setY0($value);
1745 $this->matimage->setEntityref($value);
1749 if (!$this->matimage->getEmbedded() && strlen($this->matimage->getUri())) {
1750 $img_string = @file_get_contents(dirname($this->xml_file) .
'/' . $this->matimage->getUri());
1752 if (is_string($img_string)) {
1753 $this->matimage->setContent($img_string);
1761 foreach ($a_attribs as $attribute => $value) {
1762 switch (strtolower($attribute)) {
1764 $this->decvar->setVarname($value);
1767 $this->decvar->setVartype($value);
1770 $this->decvar->setDefaultval($value);
1773 $this->decvar->setMinvalue($value);
1776 $this->decvar->setMaxvalue($value);
1779 $this->decvar->setMembers($value);
1782 $this->decvar->setCutvalue($value);
1793 $parser = xml_parser_create();
1794 $is_resource = is_resource($parser);
1795 xml_parser_free($parser);
1797 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)
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)
__construct(?string $a_xml_file, int $a_mode=self::IL_MO_PARSE_QTI, int $a_qpl_id=0, $a_import_idents="")
ilQTIPresentation $presentation
const QT_MULTIPLE_CHOICE_SR
virusDetected(string $buffer)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
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)
const QT_MULTIPLE_CHOICE_MR
ilQTIResponseVar $responsevar
ilQTIConditionvar $conditionvar
string $verifyfieldentrytext
__construct(Container $dic, ilPlugin $plugin)
ilQTIDisplayfeedback $displayfeedback
getImportMapping()
Get array of new created questions for import id.
const QUESTION_SET_TYPE_FIXED
static _includeClass(string $question_type, int $gui=0)
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)