19 declare(strict_types=1);
186 private array
$metadata = [
"label" =>
"",
"entry" =>
""];
195 private readonly
string $importdir,
197 int $a_mode = self::IL_MO_PARSE_QTI,
199 array $import_idents = [],
200 private array $mappings = []
204 $this->user_id = $DIC[
'ilUser']->getId();
206 $this->parser_mode = $a_mode;
210 $this->qpl_id = $a_qpl_id;
211 $this->
lng = $DIC->language();
212 if ($import_idents !== []) {
242 $this->tst_id = $this->tst_object->
getId();
259 xml_set_object($a_xml_parser, $this);
260 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
261 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
266 $this->question_counter = 1;
267 parent::startParsing();
275 if ($this->depth[$a_xml_parser] > 0) {
276 return $this->path[$this->depth[$a_xml_parser] - 1];
286 public function handlerBeginTag($a_xml_parser,
string $a_name, array $a_attribs): void
288 switch ($this->parser_mode) {
289 case self::IL_MO_PARSE_QTI:
292 case self::IL_MO_VERIFY_QTI:
304 if ($this->do_nothing) {
307 $this->sametag =
false;
308 $this->characterbuffer =
"";
309 $this->depth[$a_xml_parser] = ($this->depth[$a_xml_parser] ?? 0) + 1;
310 $this->path[$this->depth[$a_xml_parser]] = strtolower($a_name);
311 $this->qti_element = $a_name;
313 switch (strtolower($a_name)) {
317 case "assessmentcontrol":
322 $this->in_objectives =
true;
324 case 'presentation_material':
326 $this->in_prensentation_material =
true;
332 $this->in_itemmetadata =
true;
334 case "qtimetadatafield":
335 $this->metadata = [
"label" =>
"",
"entry" =>
""];
346 case "displayfeedback":
356 if ($this->conditionvar != null) {
357 $this->conditionvar->addNot();
361 if ($this->conditionvar != null) {
362 $this->conditionvar->addAnd();
366 if ($this->conditionvar != null) {
367 $this->conditionvar->addOr();
375 foreach ($a_attribs as $attribute => $value) {
376 switch (strtolower($attribute)) {
378 $this->responsevar->setRespident($value);
381 $this->responsevar->setIndex($value);
388 foreach ($a_attribs as $attribute => $value) {
389 switch (strtolower($attribute)) {
391 $this->responsevar->setRespident($value);
394 $this->responsevar->setIndex($value);
401 foreach ($a_attribs as $attribute => $value) {
402 switch (strtolower($attribute)) {
404 $this->responsevar->setRespident($value);
407 $this->responsevar->setIndex($value);
414 foreach ($a_attribs as $attribute => $value) {
415 switch (strtolower($attribute)) {
417 $this->responsevar->setRespident($value);
420 $this->responsevar->setIndex($value);
427 foreach ($a_attribs as $attribute => $value) {
428 switch (strtolower($attribute)) {
430 $this->responsevar->setRespident($value);
433 $this->responsevar->setSetmatch($value);
436 $this->responsevar->setIndex($value);
443 foreach ($a_attribs as $attribute => $value) {
444 switch (strtolower($attribute)) {
446 $this->responsevar->setRespident($value);
449 $this->responsevar->setAreatype($value);
452 $this->responsevar->setIndex($value);
459 foreach ($a_attribs as $attribute => $value) {
460 switch (strtolower($attribute)) {
462 $this->responsevar->setCase($value);
465 $this->responsevar->setRespident($value);
468 $this->responsevar->setIndex($value);
473 case "respcondition":
475 foreach ($a_attribs as $attribute => $value) {
476 switch (strtolower($attribute)) {
478 $this->respcondition->setContinue($value);
481 $this->respcondition->setTitle($value);
504 case "questestinterop":
505 $this->hasRootElement =
true;
513 $this->in_presentation =
true;
516 case "response_label":
519 case "render_choice":
522 case "render_hotspot":
546 case "resprocessing":
550 $this->solutionhint[
'points'] = (float) $a_attribs[
'points'];
560 switch ($this->parser_mode) {
561 case self::IL_MO_PARSE_QTI:
564 case self::IL_MO_VERIFY_QTI:
576 if ($this->do_nothing && strtolower($a_name) !==
"item") {
579 switch (strtolower($a_name)) {
581 if (is_object($this->tst_object)) {
582 $this->tst_object->fromXML($this->
assessment, $this->mappings);
584 $this->in_assessment =
false;
586 case "assessmentcontrol":
587 $this->
assessment->addAssessmentcontrol($this->assessmentcontrol);
588 $this->assessmentcontrol = null;
591 if (strtolower($this->
getParent($a_xml_parser)) ===
"assessment") {
592 $this->
assessment->addObjectives($this->objectives);
594 $this->in_objectives =
false;
596 case 'presentation_material':
597 $this->
assessment->setPresentationMaterial($this->prensentation_material);
598 $this->in_prensentation_material =
false;
601 $this->in_itemmetadata =
false;
603 case "qtimetadatafield":
605 switch ($this->metadata[
"label"]) {
606 case "ILIAS_VERSION":
607 if ($this->item !== null) {
608 $this->item->setIliasSourceVersion(
614 if ($this->item !== null) {
615 $this->item->setQuestiontype($this->metadata[
"entry"]);
619 if ($this->item !== null) {
620 $this->item->setAuthor($this->metadata[
"entry"]);
624 if ($this->item !== null) {
625 $this->item->addMetadata($this->metadata);
629 if ($this->in_assessment) {
630 $this->
assessment->addQtiMetadata($this->metadata);
632 $this->metadata = [
"label" =>
"",
"entry" =>
""];
638 if (count($this->flow_mat)) {
639 $flow_mat = array_pop($this->flow_mat);
640 if (count($this->flow_mat)) {
641 $this->flow_mat[count($this->flow_mat) - 1]->addFlowMat($flow_mat);
642 } elseif ($this->in_prensentation_material) {
643 $this->prensentation_material->addFlowMat($flow_mat);
644 } elseif ($this->itemfeedback != null) {
645 $this->itemfeedback->addFlowMat($flow_mat);
646 } elseif ($this->response_label != null) {
647 $this->response_label->addFlow_mat($flow_mat);
652 if ($this->item != null) {
653 if ($this->itemfeedback != null) {
654 $this->item->addItemfeedback($this->itemfeedback);
657 $this->itemfeedback = null;
659 case "displayfeedback":
660 if ($this->respcondition != null) {
661 if ($this->displayfeedback != null) {
662 $this->respcondition->addDisplayfeedback($this->displayfeedback);
665 $this->displayfeedback = null;
668 if ($this->respcondition !== null) {
669 if ($this->setvar != null) {
670 $this->respcondition->addSetvar($this->setvar);
673 $this->setvar = null;
676 if ($this->respcondition !== null) {
677 $this->respcondition->setConditionvar($this->conditionvar);
679 $this->conditionvar = null;
689 if ($this->conditionvar != null) {
690 if ($this->responsevar != null) {
691 $this->conditionvar->addResponseVar($this->responsevar);
694 $this->responsevar = null;
696 case "respcondition":
697 if ($this->resprocessing != null) {
698 $this->resprocessing->addRespcondition($this->respcondition);
700 $this->respcondition = null;
703 if ($this->resprocessing != null) {
704 $this->resprocessing->setOutcomes($this->outcomes);
706 $this->outcomes = null;
709 if ($this->outcomes != null) {
710 $this->outcomes->addDecvar($this->decvar);
712 $this->decvar = null;
715 $this->in_presentation =
false;
716 if ($this->presentation != null && $this->item != null) {
717 $this->item->setPresentation($this->presentation);
719 $this->presentation = null;
721 case "response_label":
722 if ($this->render_type != null) {
723 $this->render_type->addResponseLabel($this->response_label);
724 $this->response_label = null;
727 case "render_choice":
728 case "render_hotspot":
730 if ($this->in_response) {
731 if ($this->response != null) {
732 if ($this->render_type != null) {
733 $this->response->setRenderType($this->render_type);
734 $this->render_type = null;
745 if ($this->presentation != null) {
746 if ($this->response != null) {
747 $this->presentation->addResponse($this->response);
748 if ($this->item != null) {
749 $this->item->addPresentationitem($this->response);
753 $this->response = null;
754 $this->in_response =
false;
757 if ($this->do_nothing) {
758 $this->do_nothing =
false;
767 $qt = $this->item->determineQuestionType();
768 $presentation = $this->item->getPresentation();
774 $question =
new $qt();
775 $fbt = str_replace(
'ass',
'ilAss', $qt) .
'Feedback';
776 $question->feedbackOBJ =
new $fbt(
782 $this->import_mapping = $question->fromXML(
789 $this->question_counter,
790 $this->import_mapping,
794 $this->solutionhints = [];
796 $this->numImportedItems++;
800 if ($this->material) {
801 $mat = $this->material->getMaterial(0);
802 if (!is_array($mat)) {
803 $this->material = null;
806 if ($mat[
"type"] ===
"mattext" && $mat[
"material"]->
getLabel() ===
"suggested_solution") {
807 $this->item->addSuggestedSolution($mat[
"material"], $this->gap_index);
809 if ($this->in_objectives) {
810 $this->objectives->addMaterial($this->material);
811 } elseif ($this->render_type != null && strtolower($this->
getParent($a_xml_parser)) ===
"render_hotspot") {
812 $this->render_type->addMaterial($this->material);
813 } elseif (count($this->flow_mat) && strtolower($this->
getParent($a_xml_parser)) ===
"flow_mat") {
814 $this->flow_mat[count($this->flow_mat) - 1]->addMaterial($this->material);
815 } elseif ($this->itemfeedback != null) {
816 $this->itemfeedback->addMaterial($this->material);
817 } elseif ($this->response_label != null) {
818 $this->response_label->addMaterial($this->material);
819 } elseif ($this->response != null) {
820 if ($this->response->hasRendering()) {
821 $this->response->setMaterial2($this->material);
823 $this->response->setMaterial1($this->material);
825 } elseif (($this->in_presentation) && (!$this->in_response)) {
826 if (!is_object($this->item->getQuestiontext())) {
827 $this->item->setQuestiontext($this->material);
829 $this->presentation->addMaterial($this->material);
830 } elseif ($this->presentation != null) {
831 $this->presentation->addMaterial($this->material);
832 if ($this->item != null) {
833 $this->item->addPresentationitem($this->material);
837 $this->material = null;
845 if ($this->
virusDetected($this->matimage->getRawContent())) {
850 $matImageSecurity->sanitizeLabel();
854 if (!$matImageSecurity->validate()) {
858 $this->material->addMatimage($this->matimage);
859 $this->matimage = null;
865 $this->mattext->setContent(
'<br />');
866 $this->material->addMattext($this->mattext);
867 $this->mattext = null;
869 case "resprocessing":
870 if ($this->item != null) {
871 $this->item->addResprocessing($this->resprocessing);
873 $this->resprocessing = null;
876 if ($this->material != null) {
877 $this->material->addMattext($this->mattext);
879 $this->mattext = null;
882 if ($this->material != null) {
883 $this->material->addMatapplet($this->matapplet);
885 $this->matapplet = null;
893 $this->depth[$a_xml_parser] -= 1;
901 switch ($this->parser_mode) {
902 case self::IL_MO_PARSE_QTI:
905 case self::IL_MO_VERIFY_QTI:
916 if ($this->do_nothing) {
919 $this->characterbuffer .= $a_data;
921 switch ($this->qti_element) {
923 $this->metadata[
"label"] = $a_data;
926 $this->metadata[
"entry"] = $a_data;
928 case "response_label":
929 if ($this->response_label != null) {
930 $this->response_label->setContent($a_data);
934 if ($this->setvar != null) {
935 $this->setvar->setContent($a_data);
938 case "displayfeedback":
939 if ($this->displayfeedback != null) {
940 $this->displayfeedback->setContent($a_data);
951 if ($this->responsevar != null) {
952 $this->responsevar->setContent($a_data);
956 if (strlen($a_data)) {
957 if ($this->decvar != null) {
958 $this->decvar->setContent($a_data);
963 if ($this->mattext != null) {
964 $this->mattext->setContent($a_data);
968 if ($this->matapplet != null) {
969 $this->matapplet->setContent($a_data);
973 if ($this->matimage != null) {
974 $this->matimage->setContent($a_data);
978 switch ($this->
getParent($a_xml_parser)) {
986 $this->item->setDuration($a_data);
991 switch ($this->
getParent($a_xml_parser)) {
993 $this->item->setComment($a_data);
1003 $this->sametag =
true;
1012 $this->qti_element = $a_name;
1014 switch (strtolower($a_name)) {
1017 $this->in_assessment =
true;
1018 foreach ($a_attribs as $attribute => $value) {
1019 switch (strtolower($attribute)) {
1029 case "questestinterop":
1030 $this->verifyroot =
true;
1032 case "qtimetadatafield":
1033 $this->metadata = [
"label" =>
"",
"entry" =>
""];
1034 $this->verifymetadatafield = 1;
1037 $this->verifyfieldlabeltext =
"";
1038 if ($this->verifymetadatafield == 1) {
1039 $this->verifyfieldlabel = 1;
1043 $this->verifyfieldentrytext =
"";
1044 if ($this->verifymetadatafield == 1) {
1045 $this->verifyfieldentry = 1;
1050 foreach ($a_attribs as $attribute => $value) {
1051 switch (strtolower($attribute)) {
1057 $this->founditems[] = [
"title" =>
"$title",
"type" =>
"",
"ident" => $a_attribs[
"ident"]];
1059 case "response_lid":
1060 if ($this->founditems[count($this->founditems) - 1][
'type'] ===
'') {
1062 foreach ($a_attribs as $attribute => $value) {
1063 switch (strtolower($attribute)) {
1064 case "rcardinality":
1065 switch (strtolower($value)) {
1083 $this->solutionhint =
array_map(
'intval', $a_attribs);
1084 $this->solutionhint[
'txt'] =
'';
1086 case "response_str":
1087 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1089 foreach ($a_attribs as $attribute => $value) {
1090 switch (strtolower($attribute)) {
1091 case "rcardinality":
1092 switch (strtolower($value)) {
1106 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1110 case "response_num":
1111 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1115 case "response_grp":
1116 if (strlen($this->founditems[count($this->founditems) - 1][
"type"]) == 0) {
1122 $this->verifyqticomment = 1;
1124 case "presentation":
1125 foreach ($a_attribs as $attribute => $value) {
1126 switch (strtolower($attribute)) {
1128 $this->founditems[count($this->founditems) - 1][
"title"] = $value;
1141 switch (strtolower($a_name)) {
1143 foreach ($this->
assessment->qtimetadata as $metaField) {
1144 if ($metaField[
'label'] ==
'question_set_type') {
1149 if ($metaField[
'label'] ==
'random_test') {
1150 if ($metaField[
'entry'] == 1) {
1158 $this->in_assessment =
false;
1162 $this->verifyqticomment = 0;
1164 case "qtimetadatafield":
1165 $this->verifymetadatafield = 0;
1166 if ($this->verifyfieldlabeltext ===
"QUESTIONTYPE") {
1169 if ($this->in_assessment) {
1170 $this->
assessment->addQtiMetadata($this->metadata);
1172 $this->metadata = [
"label" =>
"",
"entry" =>
""];
1175 $this->verifyfieldlabel = 0;
1178 $this->verifyfieldentry = 0;
1188 if ($this->verifyqticomment == 1) {
1189 if (preg_match(
"/Questiontype\=(.*)/", $a_data, $matches)) {
1190 if (count($this->founditems)) {
1191 $this->founditems[count($this->founditems) - 1][
"type"] = $matches[1];
1194 } elseif ($this->verifyfieldlabel == 1) {
1195 $this->verifyfieldlabeltext = $a_data;
1196 } elseif ($this->verifyfieldentry == 1) {
1197 $this->verifyfieldentrytext = $a_data;
1200 switch ($this->qti_element) {
1202 $this->metadata[
"label"] = $a_data;
1205 $this->metadata[
"entry"] = $a_data;
1232 $questionIdMapping = [];
1235 $oldQuestionId = substr($k, strpos($k,
'qst_') + strlen(
'qst_'));
1236 $newQuestionId = $v[
'test'];
1238 $questionIdMapping[$oldQuestionId] = $newQuestionId;
1241 return $questionIdMapping;
1248 parent::setXMLContent($a_xml_content);
1256 $xmlContent = file_get_contents($this->xml_file);
1258 file_put_contents($this->xml_file, $xmlContent);
1260 return parent::openXMLFile();
1267 if (preg_match(
'/^(\d+\.\d+\.\d+)$/', $versionDateString, $matches)) {
1278 if (preg_match(
'/^il_(\d+?)_qst_\d+$/', $itemIdent, $matches)) {
1295 for ($i = 0x00, $max = 0x08; $i <= $max; $i += 0x01) {
1296 $needles[] =
"&#{$i};";
1298 for ($i = 0x0b, $max = 0x0c; $i <= $max; $i += 0x01) {
1299 $needles[] =
"&#{$i};";
1301 for ($i = 0x0e, $max = 0x1f; $i <= $max; $i += 0x01) {
1302 $needles[] =
"&#{$i};";
1304 for ($i = 0xd800, $max = 0xdfff; $i <= $max; $i += 0x0001) {
1305 $needles[] =
"&#{$i};";
1307 for ($i = 0xfffe, $max = 0xffff; $i <= $max; $i += 0x0001) {
1308 $needles[] =
"&#{$i};";
1310 $reg =
'/(' . implode(
'|', $needles) .
')/';
1311 $xmlContent = preg_replace($reg,
'', $xmlContent);
1323 if (!$this->material) {
1327 if (!$this->matimage) {
1342 return $vs->scanBuffer($buffer);
1348 $this->in_assessment =
true;
1349 foreach ($a_attribs as $attribute => $value) {
1350 switch (strtolower($attribute)) {
1364 foreach ($a_attribs as $attribute => $value) {
1365 switch (strtolower($attribute)) {
1366 case "solutionswitch":
1367 $this->assessmentcontrol->setSolutionswitch($value);
1370 $this->assessmentcontrol->setHintswitch($value);
1372 case "feedbackswitch":
1373 $this->assessmentcontrol->setFeedbackswitch($value);
1382 foreach ($a_attribs as $attribute => $value) {
1383 switch (strtolower($attribute)) {
1385 $this->itemfeedback->setIdent($value);
1388 $this->itemfeedback->setView($value);
1397 foreach ($a_attribs as $attribute => $value) {
1398 switch (strtolower($attribute)) {
1399 case "feedbacktype":
1400 $this->displayfeedback->setFeedbacktype($value);
1403 $this->displayfeedback->setLinkrefid($value);
1412 foreach ($a_attribs as $attribute => $value) {
1413 switch (strtolower($attribute)) {
1415 $this->setvar->setAction($value);
1418 $this->setvar->setVarname($value);
1427 foreach ($a_attribs as $attribute => $value) {
1428 switch (strtolower($attribute)) {
1430 $this->responsevar->setCase($value);
1433 $this->responsevar->setRespident($value);
1436 $this->responsevar->setIndex($value);
1445 switch (strtolower($a_name)) {
1446 case "response_lid":
1452 case "response_str":
1455 case "response_num":
1458 case "response_grp":
1462 $this->in_response =
true;
1464 $this->response->setFlow($this->flow);
1465 foreach ($a_attribs as $attribute => $value) {
1466 switch (strtolower($attribute)) {
1468 $this->response->setIdent($value);
1471 $this->response->setRTiming($value);
1473 case "rcardinality":
1474 $this->response->setRCardinality($value);
1477 $this->response->setNumtype($value);
1485 $this->gap_index = 0;
1486 $this->item = $this->items[] =
new ilQTIItem();
1487 foreach ($a_attribs as $attribute => $value) {
1488 switch (strtolower($attribute)) {
1490 $this->item->setIdent($value);
1491 $this->item->setIliasSourceNic(
1495 $this->do_nothing =
true;
1496 } elseif ($this->import_idents !== []
1497 && !in_array($value, $this->import_idents)) {
1498 $this->do_nothing =
true;
1502 $this->item->setTitle($value);
1505 $this->item->setMaxattempts($value);
1514 foreach ($a_attribs as $attribute => $value) {
1515 switch (strtolower($attribute)) {
1517 $this->resprocessing->setScoremodel($value);
1525 if (!$this->in_response) {
1529 foreach ($a_attribs as $attribute => $value) {
1530 switch (strtolower($attribute)) {
1532 $this->render_type->setEncoding($value);
1535 $this->render_type->setFibtype($value);
1538 $this->render_type->setRows($value);
1541 $this->render_type->setMaxchars($value);
1544 $this->render_type->setPrompt($value);
1547 $this->render_type->setColumns($value);
1550 $this->render_type->setCharset($value);
1553 $this->render_type->setMaxnumber($value);
1556 $this->render_type->setMinnumber($value);
1564 if (!$this->in_response) {
1568 foreach ($a_attribs as $attribute => $value) {
1569 switch (strtolower($attribute)) {
1571 $this->render_type->setShowdraw($value);
1574 $this->render_type->setMinnumber($value);
1577 $this->render_type->setMaxnumber($value);
1585 if (!$this->in_response) {
1589 foreach ($a_attribs as $attribute => $value) {
1590 switch (strtolower($attribute)) {
1592 $this->render_type->setShuffle($value);
1595 $this->render_type->setMinnumber($value);
1598 $this->render_type->setMaxnumber($value);
1606 if ($this->render_type == null) {
1610 foreach ($a_attribs as $attribute => $value) {
1611 switch (strtolower($attribute)) {
1613 $this->response_label->setRshuffle($value);
1616 $this->response_label->setRarea($value);
1619 $this->response_label->setRrange($value);
1622 $this->response_label->setLabelrefid($value);
1625 $this->response_label->setIdent($value);
1628 $this->response_label->setMatchGroup($value);
1631 $this->response_label->setMatchMax($value);
1640 foreach ($a_attribs as $attribute => $value) {
1641 switch (strtolower($attribute)) {
1643 $this->matapplet->setLabel($value);
1646 $this->matapplet->setUri($value);
1649 $this->matapplet->setY0($value);
1652 $this->matapplet->setHeight($value);
1655 $this->matapplet->setWidth($value);
1658 $this->matapplet->setX0($value);
1661 $this->matapplet->setEmbedded($value);
1664 $this->matapplet->setEntityref($value);
1673 foreach ($a_attribs as $attribute => $value) {
1674 switch (strtolower($attribute)) {
1676 $this->mattext->setTexttype($value);
1679 $this->mattext->setLabel($value);
1682 $this->mattext->setCharset($value);
1685 $this->mattext->setUri($value);
1688 $this->mattext->setXmlspace($value);
1691 $this->mattext->setXmllang($value);
1694 $this->mattext->setEntityref($value);
1697 $this->mattext->setHeight($value);
1700 $this->mattext->setWidth($value);
1703 $this->mattext->setX0($value);
1706 $this->mattext->setY0($value);
1715 $this->material->setFlow($this->flow);
1716 foreach ($a_attribs as $attribute => $value) {
1717 switch (strtolower($attribute)) {
1719 $this->material->setLabel($value);
1728 foreach ($a_attribs as $attribute => $value) {
1729 switch (strtolower($attribute)) {
1731 $this->matimage->setImagetype($value);
1734 $this->matimage->setLabel($value);
1737 $this->matimage->setHeight($value);
1740 $this->matimage->setWidth($value);
1743 $this->matimage->setUri($value);
1746 $this->matimage->setEmbedded($value);
1749 $this->matimage->setX0($value);
1752 $this->matimage->setY0($value);
1755 $this->matimage->setEntityref($value);
1759 if (!$this->matimage->getEmbedded() && strlen($this->matimage->getUri())) {
1760 $img_string = @file_get_contents(dirname($this->xml_file) .
'/' . $this->matimage->getUri());
1762 if (is_string($img_string)) {
1763 $this->matimage->setContent($img_string);
1771 foreach ($a_attribs as $attribute => $value) {
1772 switch (strtolower($attribute)) {
1774 $this->decvar->setVarname($value);
1777 $this->decvar->setVartype($value);
1780 $this->decvar->setDefaultval($value);
1783 $this->decvar->setMinvalue($value);
1786 $this->decvar->setMaxvalue($value);
1789 $this->decvar->setMembers($value);
1792 $this->decvar->setCutvalue($value);
1803 $parser = xml_parser_create();
1804 $is_resource = is_resource($parser);
1805 xml_parser_free($parser);
1807 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)
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)
setTestObject(ilObjTest $tst_object)
handlerCharacterData($a_xml_parser, string $a_data)
QuestionFiles $questionfiles
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
varEqualBeginTag(array $a_attribs)
renderFibBeginTag(array $a_attribs)
handlerEndTag($a_xml_parser, string $a_name)
__construct(?string $path_to_file='', ?bool $throw_exception=false)
ilQTIMatapplet $matapplet
handlerParseCharacterData($a_xml_parser, string $a_data)
materialBeginTag(array $a_attribs)