ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilQTIParser Class Reference
+ Inheritance diagram for ilQTIParser:
+ Collaboration diagram for ilQTIParser:

Public Member Functions

 isIgnoreItemsEnabled ()
 
 setIgnoreItemsEnabled (bool $ignoreItemsEnabled)
 
 getQuestionSetType ()
 
 setTestObject (ilObjTest $tst_object)
 
 getTestObject ()
 
 setHandlers ($a_xml_parser)
 set event handler should be overwritten by inherited class @access private More...
 
 startParsing ()
 stores xml data in array More...
 
 getParent ($a_xml_parser)
 
 handlerBeginTag ($a_xml_parser, string $a_name, array $a_attribs)
 
 handlerParseBeginTag ($a_xml_parser, string $a_name, array $a_attribs)
 
 handlerEndTag ($a_xml_parser, string $a_name)
 
 handlerParseEndTag ($a_xml_parser, string $a_name)
 @noinspection NotOptimalIfConditionsInspection More...
 
 handlerCharacterData ($a_xml_parser, string $a_data)
 
 handlerParseCharacterData ($a_xml_parser, string $a_data)
 
 handlerVerifyBeginTag ($a_xml_parser, string $a_name, array $a_attribs)
 
 handlerVerifyEndTag ($a_xml_parser, string $a_name)
 
 handlerVerifyCharacterData ($a_xml_parser, string $a_data)
 
getFoundItems ()
 
 getImportMapping ()
 Get array of new created questions for import id. More...
 
 getQuestionIdMapping ()
 
 setXMLContent (string $a_xml_content)
 
 getNumImportedItems ()
 
- Public Member Functions inherited from ilSaxParser
 __construct (?string $path_to_file='', ?bool $throw_exception=false)
 
 setXMLContent (string $a_xml_content)
 
 getXMLContent ()
 
 getInputType ()
 
 startParsing ()
 stores xml data in array More...
 
 createParser ()
 
 setHandlers ($a_xml_parser)
 
 parse ($a_xml_parser, $a_fp=null)
 

Data Fields

const IL_MO_PARSE_QTI = 1
 
const IL_MO_VERIFY_QTI = 2
 
bool $hasRootElement = false
 
array $path = []
 
array $items = []
 
ilQTIItem $item = null
 
 $depth
 
string $qti_element = ""
 
bool $in_presentation = false
 
bool $in_response = false
 
 $render_type = null
 
ilQTIResponseLabel $response_label = null
 
ilQTIMaterial $material = null
 
ilQTIMatimage $matimage = null
 
ilQTIResponse $response = null
 
ilQTIResprocessing $resprocessing = null
 
ilQTIOutcomes $outcomes = null
 
ilQTIDecvar $decvar = null
 
ilQTIRespcondition $respcondition = null
 
ilQTISetvar $setvar = null
 
ilQTIDisplayfeedback $displayfeedback = null
 
ilQTIItemfeedback $itemfeedback = null
 
array $flow_mat = []
 
int $flow = 0
 
ilQTIPresentation $presentation = null
 
ilQTIMattext $mattext = null
 
bool $sametag = false
 
string $characterbuffer = ""
 
ilQTIConditionvar $conditionvar = null
 
int $parser_mode = 0
 
array $import_idents = []
 
int $qpl_id = 0
 
int $tst_id = null
 
ilObjTest $tst_object = null
 
bool $do_nothing = false
 
int $gap_index = 0
 
array $assessments = []
 
ilQTIAssessment $assessment = null
 
ilQTIAssessmentcontrol $assessmentcontrol = null
 
ilQTIObjectives $objectives = null
 
bool $in_assessment = false
 
ilQTISection $section = null
 
array $import_mapping = []
 
int $question_counter = 1
 
bool $in_itemmetadata = false
 
bool $in_objectives = false
 
array $founditems = []
 
bool $verifyroot = false
 
int $verifyqticomment = 0
 
int $verifymetadatafield = 0
 
int $verifyfieldlabel = 0
 
string $verifyfieldlabeltext = ""
 
int $verifyfieldentry = 0
 
string $verifyfieldentrytext = ""
 
- Data Fields inherited from ilSaxParser
string $xml_file
 
bool $throw_exception = false
 

Protected Member Functions

 setQuestionSetType (string $questionSetType)
 
 openXMLFile ()
 
Returns
resource
Exceptions
ilSaxParserException
More...
 
 fetchNumericVersionFromVersionDateString (string $versionDateString)
 
 fetchSourceNicFromItemIdent (string $itemIdent)
 
 cleanInvalidXmlChars (string $xmlContent)
 
 isMatImageAvailable ()
 
 virusDetected (string $buffer)
 
- Protected Member Functions inherited from ilSaxParser
 openXMLFile ()
 
 handleError (string $message)
 
 setThrowException (bool $throw_exception)
 

Protected Attributes

int $numImportedItems = 0
 
ilQTIPresentationMaterial $prensentation_material = null
 
bool $in_prensentation_material = false
 
bool $ignoreItemsEnabled = false
 
string $questionSetType = null
 
QuestionFiles $questionfiles
 
- Protected Attributes inherited from ilSaxParser
ilLanguage $lng = null
 

Private Member Functions

 assessmentBeginTag (array $a_attribs)
 
 assessmentControlBeginTag (array $a_attribs)
 
 itemFeedbackBeginTag (array $a_attribs)
 
 displayFeedbackBeginTag (array $a_attribs)
 
 setVarBeginTag (array $a_attribs)
 
 varEqualBeginTag (array $a_attribs)
 
 termsAndDefinitionsBeginTag (string $a_name, array $a_attribs)
 
 itemBeginTag (array $a_attribs)
 
 resprocessingBeginTag (array $a_attribs)
 
 renderFibBeginTag (array $a_attribs)
 
 renderHotspotBeginTag (array $a_attribs)
 
 renderChoiceBeginTag (array $a_attribs)
 
 responseLabelBeginTag (array $a_attribs)
 
 matAppletBeginTag (array $a_attribs)
 
 matTextBeginTag (array $a_attribs)
 
 materialBeginTag (array $a_attribs)
 
 matImageBeginTag (array $a_attribs)
 
 decVarBeginTag (array $a_attribs)
 
 createParserStorage ()
 

Private Attributes

readonly int $user_id
 
ilQTIMatapplet $matapplet = null
 
array $metadata = ["label" => "", "entry" => ""]
 
ilQTIResponseVar $responsevar = null
 
array $attributes = []
 

Detailed Description

Definition at line 32 of file class.ilQTIParser.php.

Member Function Documentation

◆ assessmentBeginTag()

ilQTIParser::assessmentBeginTag ( array  $a_attribs)
private

Definition at line 1346 of file class.ilQTIParser.php.

1346 : void
1347 {
1348 $this->assessment = $this->assessments[] = new ilQTIAssessment();
1349 $this->in_assessment = true;
1350 foreach ($a_attribs as $attribute => $value) {
1351 switch (strtolower($attribute)) {
1352 case "title":
1353 $this->assessment->setTitle($value);
1354 break;
1355 case "ident":
1356 $this->assessment->setIdent($value);
1357 break;
1358 }
1359 }
1360 }
QTI assessment class.

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ assessmentControlBeginTag()

ilQTIParser::assessmentControlBeginTag ( array  $a_attribs)
private

Definition at line 1362 of file class.ilQTIParser.php.

1362 : void
1363 {
1364 $this->assessmentcontrol = new ilQTIAssessmentcontrol();
1365 foreach ($a_attribs as $attribute => $value) {
1366 switch (strtolower($attribute)) {
1367 case "solutionswitch":
1368 $this->assessmentcontrol->setSolutionswitch($value);
1369 break;
1370 case "hintswitch":
1371 $this->assessmentcontrol->setHintswitch($value);
1372 break;
1373 case "feedbackswitch":
1374 $this->assessmentcontrol->setFeedbackswitch($value);
1375 break;
1376 }
1377 }
1378 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ cleanInvalidXmlChars()

ilQTIParser::cleanInvalidXmlChars ( string  $xmlContent)
protected

Definition at line 1286 of file class.ilQTIParser.php.

1286 : string
1287 {
1288 // http://www.w3.org/TR/xml/#charsets
1289
1290 // DOES ACTUALLY KILL CONTENT, SHOULD CLEAN NON ESCAPED ILLEGAL CHARS, DON'T KNOW
1291 //$reg = '/[^\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u10000-\u10FFFF]/';
1292 //$xmlContent = preg_replace($reg, '', $xmlContent);
1293
1294 // remove illegal chars escaped to html entities
1295 $needles = [];
1296 for ($i = 0x00, $max = 0x08; $i <= $max; $i += 0x01) {
1297 $needles[] = "&#{$i};";
1298 }
1299 for ($i = 0x0b, $max = 0x0c; $i <= $max; $i += 0x01) {
1300 $needles[] = "&#{$i};";
1301 }
1302 for ($i = 0x0e, $max = 0x1f; $i <= $max; $i += 0x01) {
1303 $needles[] = "&#{$i};";
1304 }
1305 for ($i = 0xd800, $max = 0xdfff; $i <= $max; $i += 0x0001) {
1306 $needles[] = "&#{$i};";
1307 }
1308 for ($i = 0xfffe, $max = 0xffff; $i <= $max; $i += 0x0001) {
1309 $needles[] = "&#{$i};";
1310 }
1311 $reg = '/(' . implode('|', $needles) . ')/';
1312 $xmlContent = preg_replace($reg, '', $xmlContent);
1313
1314 return $xmlContent;
1315 }

Referenced by openXMLFile(), and setXMLContent().

+ Here is the caller graph for this function:

◆ createParserStorage()

ilQTIParser::createParserStorage ( )
private
Returns
SplObjectStorage<XMLParser, int>|array<resource, int>

Definition at line 1802 of file class.ilQTIParser.php.

1803 {
1804 $parser = xml_parser_create();
1805 $is_resource = is_resource($parser);
1806 xml_parser_free($parser);
1807
1808 return $is_resource ? [] : new SplObjectStorage();
1809 }

◆ decVarBeginTag()

ilQTIParser::decVarBeginTag ( array  $a_attribs)
private

Definition at line 1769 of file class.ilQTIParser.php.

1769 : void
1770 {
1771 $this->decvar = new ilQTIDecvar();
1772 foreach ($a_attribs as $attribute => $value) {
1773 switch (strtolower($attribute)) {
1774 case "varname":
1775 $this->decvar->setVarname($value);
1776 break;
1777 case "vartype":
1778 $this->decvar->setVartype($value);
1779 break;
1780 case "defaultval":
1781 $this->decvar->setDefaultval($value);
1782 break;
1783 case "minvalue":
1784 $this->decvar->setMinvalue($value);
1785 break;
1786 case "maxvalue":
1787 $this->decvar->setMaxvalue($value);
1788 break;
1789 case "members":
1790 $this->decvar->setMembers($value);
1791 break;
1792 case "cutvalue":
1793 $this->decvar->setCutvalue($value);
1794 break;
1795 }
1796 }
1797 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ displayFeedbackBeginTag()

ilQTIParser::displayFeedbackBeginTag ( array  $a_attribs)
private

Definition at line 1395 of file class.ilQTIParser.php.

1395 : void
1396 {
1397 $this->displayfeedback = new ilQTIDisplayfeedback();
1398 foreach ($a_attribs as $attribute => $value) {
1399 switch (strtolower($attribute)) {
1400 case "feedbacktype":
1401 $this->displayfeedback->setFeedbacktype($value);
1402 break;
1403 case "linkrefid":
1404 $this->displayfeedback->setLinkrefid($value);
1405 break;
1406 }
1407 }
1408 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ fetchNumericVersionFromVersionDateString()

ilQTIParser::fetchNumericVersionFromVersionDateString ( string  $versionDateString)
protected

Definition at line 1264 of file class.ilQTIParser.php.

1264 : ?string
1265 {
1266 $matches = null;
1267
1268 if (preg_match('/^(\d+\.\d+\.\d+)$/', $versionDateString, $matches)) {
1269 return $matches[1];
1270 }
1271
1272 return null;
1273 }

Referenced by handlerParseEndTag().

+ Here is the caller graph for this function:

◆ fetchSourceNicFromItemIdent()

ilQTIParser::fetchSourceNicFromItemIdent ( string  $itemIdent)
protected

Definition at line 1275 of file class.ilQTIParser.php.

1275 : ?string
1276 {
1277 $matches = null;
1278
1279 if (preg_match('/^il_(\d+?)_qst_\d+$/', $itemIdent, $matches)) {
1280 return $matches[1];
1281 }
1282
1283 return null;
1284 }

Referenced by itemBeginTag().

+ Here is the caller graph for this function:

◆ getFoundItems()

& ilQTIParser::getFoundItems ( )
Returns
array{title: string, type: string, ident: string}[]

Definition at line 1214 of file class.ilQTIParser.php.

1214 : array
1215 {
1216 return $this->founditems;
1217 }

References $founditems.

◆ getImportMapping()

ilQTIParser::getImportMapping ( )

Get array of new created questions for import id.

Returns
array<string, {test: mixed}>

Definition at line 1223 of file class.ilQTIParser.php.

1223 : array
1224 {
1225 return $this->import_mapping;
1226 }

References $import_mapping.

Referenced by getQuestionIdMapping().

+ Here is the caller graph for this function:

◆ getNumImportedItems()

ilQTIParser::getNumImportedItems ( )

Definition at line 1317 of file class.ilQTIParser.php.

1317 : int
1318 {
1320 }

References $numImportedItems.

◆ getParent()

ilQTIParser::getParent (   $a_xml_parser)
Parameters
XMLParser | resource$a_xml_parser

Definition at line 273 of file class.ilQTIParser.php.

273 : string
274 {
275 if ($this->depth[$a_xml_parser] > 0) {
276 return $this->path[$this->depth[$a_xml_parser] - 1];
277 }
278
279 return "";
280 }

Referenced by handlerParseCharacterData(), and handlerParseEndTag().

+ Here is the caller graph for this function:

◆ getQuestionIdMapping()

ilQTIParser::getQuestionIdMapping ( )
Returns
array<string, mixed>

Definition at line 1231 of file class.ilQTIParser.php.

1231 : array
1232 {
1233 $questionIdMapping = [];
1234
1235 foreach ($this->getImportMapping() as $k => $v) {
1236 $oldQuestionId = substr($k, strpos($k, 'qst_') + strlen('qst_'));
1237 $newQuestionId = $v['test']; // yes, this is the new question id ^^
1238
1239 $questionIdMapping[$oldQuestionId] = $newQuestionId;
1240 }
1241
1242 return $questionIdMapping;
1243 }
getImportMapping()
Get array of new created questions for import id.

References getImportMapping().

+ Here is the call graph for this function:

◆ getQuestionSetType()

ilQTIParser::getQuestionSetType ( )

Definition at line 230 of file class.ilQTIParser.php.

230 : ?string
231 {
233 }

References $questionSetType.

◆ getTestObject()

ilQTIParser::getTestObject ( )

Definition at line 246 of file class.ilQTIParser.php.

246 : ilObjTest
247 {
248 return $this->tst_object;
249 }
ilObjTest $tst_object

References $tst_object.

◆ handlerBeginTag()

ilQTIParser::handlerBeginTag (   $a_xml_parser,
string  $a_name,
array  $a_attribs 
)
Parameters
XMLParser | resource$a_xml_parser
array<string,string>$a_attribs

Definition at line 286 of file class.ilQTIParser.php.

286 : void
287 {
288 switch ($this->parser_mode) {
290 $this->handlerParseBeginTag($a_xml_parser, $a_name, $a_attribs);
291 break;
293 $this->handlerVerifyBeginTag($a_xml_parser, $a_name, $a_attribs);
294 break;
295 }
296 }
handlerParseBeginTag($a_xml_parser, string $a_name, array $a_attribs)
handlerVerifyBeginTag($a_xml_parser, string $a_name, array $a_attribs)

References handlerParseBeginTag(), handlerVerifyBeginTag(), IL_MO_PARSE_QTI, and IL_MO_VERIFY_QTI.

Referenced by setHandlers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handlerCharacterData()

ilQTIParser::handlerCharacterData (   $a_xml_parser,
string  $a_data 
)
Parameters
XMLParser | resource$a_xml_parser

Definition at line 904 of file class.ilQTIParser.php.

904 : void
905 {
906 switch ($this->parser_mode) {
908 $this->handlerParseCharacterData($a_xml_parser, $a_data);
909 break;
911 $this->handlerVerifyCharacterData($a_xml_parser, $a_data);
912 break;
913 }
914 }
handlerParseCharacterData($a_xml_parser, string $a_data)
handlerVerifyCharacterData($a_xml_parser, string $a_data)

References handlerParseCharacterData(), handlerVerifyCharacterData(), IL_MO_PARSE_QTI, and IL_MO_VERIFY_QTI.

Referenced by setHandlers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handlerEndTag()

ilQTIParser::handlerEndTag (   $a_xml_parser,
string  $a_name 
)
Parameters
XMLParser | resource$a_xml_parser

Definition at line 558 of file class.ilQTIParser.php.

558 : void
559 {
560 switch ($this->parser_mode) {
562 $this->handlerParseEndTag($a_xml_parser, $a_name);
563 break;
565 $this->handlerVerifyEndTag($a_xml_parser, $a_name);
566 break;
567 }
568 }
handlerVerifyEndTag($a_xml_parser, string $a_name)
handlerParseEndTag($a_xml_parser, string $a_name)
@noinspection NotOptimalIfConditionsInspection

References handlerParseEndTag(), handlerVerifyEndTag(), IL_MO_PARSE_QTI, and IL_MO_VERIFY_QTI.

Referenced by setHandlers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handlerParseBeginTag()

ilQTIParser::handlerParseBeginTag (   $a_xml_parser,
string  $a_name,
array  $a_attribs 
)
Parameters
XMLParser | resource$a_xml_parser
array<string,string>$a_attribs

Definition at line 302 of file class.ilQTIParser.php.

302 : void
303 {
304 if ($this->do_nothing) {
305 return;
306 }
307 $this->sametag = false;
308 $this->characterbuffer = "";
309 $this->depth[$a_xml_parser] = ($this->depth[$a_xml_parser] ?? 0) + 1; // Issue with SplObjectStorage: Cannot use ++.
310 $this->path[$this->depth[$a_xml_parser]] = strtolower($a_name);
311 $this->qti_element = $a_name;
312
313 switch (strtolower($a_name)) {
314 case "assessment":
315 $this->assessmentBeginTag($a_attribs);
316 break;
317 case "assessmentcontrol":
318 $this->assessmentControlBeginTag($a_attribs);
319 break;
320 case "objectives":
321 $this->objectives = new ilQTIObjectives();
322 $this->in_objectives = true;
323 break;
324 case 'presentation_material':
325 $this->prensentation_material = new ilQTIPresentationMaterial();
326 $this->in_prensentation_material = true;
327 break;
328 case "section":
329 $this->section = new ilQTISection();
330 break;
331 case "itemmetadata":
332 $this->in_itemmetadata = true;
333 break;
334 case "qtimetadatafield":
335 $this->metadata = ["label" => "", "entry" => ""];
336 break;
337 case "fieldentry":
338 $this->attributes = $a_attribs;
339 break;
340 case "flow":
341 $this->flow++;
342 break;
343 case "flow_mat":
344 $this->flow_mat[] = new ilQTIFlowMat();
345 break;
346 case "itemfeedback":
347 $this->itemFeedbackBeginTag($a_attribs);
348 break;
349 case "displayfeedback":
350 $this->displayFeedbackBeginTag($a_attribs);
351 break;
352 case "setvar":
353 $this->setVarBeginTag($a_attribs);
354 break;
355 case "conditionvar":
356 $this->conditionvar = new ilQTIConditionvar();
357 break;
358 case "not":
359 if ($this->conditionvar != null) {
360 $this->conditionvar->addNot();
361 }
362 break;
363 case "and":
364 if ($this->conditionvar != null) {
365 $this->conditionvar->addAnd();
366 }
367 break;
368 case "or":
369 if ($this->conditionvar != null) {
370 $this->conditionvar->addOr();
371 }
372 break;
373 case "varequal":
374 $this->varEqualBeginTag($a_attribs);
375 break;
376 case "varlt":
377 $this->responsevar = new ilQTIResponseVar(ilQTIResponseVar::RESPONSEVAR_LT);
378 foreach ($a_attribs as $attribute => $value) {
379 switch (strtolower($attribute)) {
380 case "respident":
381 $this->responsevar->setRespident($value);
382 break;
383 case "index":
384 $this->responsevar->setIndex($value);
385 break;
386 }
387 }
388 break;
389 case "varlte":
390 $this->responsevar = new ilQTIResponseVar(ilQTIResponseVar::RESPONSEVAR_LTE);
391 foreach ($a_attribs as $attribute => $value) {
392 switch (strtolower($attribute)) {
393 case "respident":
394 $this->responsevar->setRespident($value);
395 break;
396 case "index":
397 $this->responsevar->setIndex($value);
398 break;
399 }
400 }
401 break;
402 case "vargt":
403 $this->responsevar = new ilQTIResponseVar(ilQTIResponseVar::RESPONSEVAR_GT);
404 foreach ($a_attribs as $attribute => $value) {
405 switch (strtolower($attribute)) {
406 case "respident":
407 $this->responsevar->setRespident($value);
408 break;
409 case "index":
410 $this->responsevar->setIndex($value);
411 break;
412 }
413 }
414 break;
415 case "vargte":
416 $this->responsevar = new ilQTIResponseVar(ilQTIResponseVar::RESPONSEVAR_GTE);
417 foreach ($a_attribs as $attribute => $value) {
418 switch (strtolower($attribute)) {
419 case "respident":
420 $this->responsevar->setRespident($value);
421 break;
422 case "index":
423 $this->responsevar->setIndex($value);
424 break;
425 }
426 }
427 break;
428 case "varsubset":
430 foreach ($a_attribs as $attribute => $value) {
431 switch (strtolower($attribute)) {
432 case "respident":
433 $this->responsevar->setRespident($value);
434 break;
435 case "setmatch":
436 $this->responsevar->setSetmatch($value);
437 break;
438 case "index":
439 $this->responsevar->setIndex($value);
440 break;
441 }
442 }
443 break;
444 case "varinside":
446 foreach ($a_attribs as $attribute => $value) {
447 switch (strtolower($attribute)) {
448 case "respident":
449 $this->responsevar->setRespident($value);
450 break;
451 case "areatype":
452 $this->responsevar->setAreatype($value);
453 break;
454 case "index":
455 $this->responsevar->setIndex($value);
456 break;
457 }
458 }
459 break;
460 case "varsubstring":
462 foreach ($a_attribs as $attribute => $value) {
463 switch (strtolower($attribute)) {
464 case "case":
465 $this->responsevar->setCase($value);
466 break;
467 case "respident":
468 $this->responsevar->setRespident($value);
469 break;
470 case "index":
471 $this->responsevar->setIndex($value);
472 break;
473 }
474 }
475 break;
476 case "respcondition":
477 $this->respcondition = new ilQTIRespcondition();
478 foreach ($a_attribs as $attribute => $value) {
479 switch (strtolower($attribute)) {
480 case "continue":
481 $this->respcondition->setContinue($value);
482 break;
483 case "title":
484 $this->respcondition->setTitle($value);
485 break;
486 }
487 }
488 break;
489 case "outcomes":
490 $this->outcomes = new ilQTIOutcomes();
491 break;
492 case "decvar":
493 $this->decVarBeginTag($a_attribs);
494 break;
495 case "matimage":
496 $this->matImageBeginTag($a_attribs);
497 break;
498 case "material":
499 $this->materialBeginTag($a_attribs);
500 break;
501 case "mattext":
502 $this->matTextBeginTag($a_attribs);
503 break;
504 case "matapplet":
505 $this->matAppletBeginTag($a_attribs);
506 break;
507 case "questestinterop":
508 $this->hasRootElement = true;
509 break;
510 case "qticomment":
511 break;
512 case "objectbank":
513 // not implemented yet
514 break;
515 case "presentation":
516 $this->in_presentation = true;
517 $this->presentation = new ilQTIPresentation();
518 break;
519 case "response_label":
520 $this->responseLabelBeginTag($a_attribs);
521 break;
522 case "render_choice":
523 $this->renderChoiceBeginTag($a_attribs);
524 break;
525 case "render_hotspot":
526 $this->renderHotspotBeginTag($a_attribs);
527 break;
528 case "render_fib":
529 $this->renderFibBeginTag($a_attribs);
530 break;
531 case "response_lid":
532 // Ordering Terms and Definitions or
533 // Ordering Terms and Pictures or
534 // Multiple choice single response or
535 // Multiple choice multiple response
536 case "response_xy":
537 // Imagemap question
538 case "response_str":
539 // Close question
540 case "response_num":
541 case "response_grp":
542 // Matching terms and definitions
543 // Matching terms and images
544 $this->termsAndDefinitionsBeginTag($a_name, $a_attribs);
545 break;
546 case "item":
547 $this->itemBeginTag($a_attribs);
548 break;
549 case "resprocessing":
550 $this->resprocessingBeginTag($a_attribs);
551 break;
552 }
553 }
resprocessingBeginTag(array $a_attribs)
renderChoiceBeginTag(array $a_attribs)
displayFeedbackBeginTag(array $a_attribs)
assessmentControlBeginTag(array $a_attribs)
itemBeginTag(array $a_attribs)
matTextBeginTag(array $a_attribs)
decVarBeginTag(array $a_attribs)
materialBeginTag(array $a_attribs)
matAppletBeginTag(array $a_attribs)
responseLabelBeginTag(array $a_attribs)
matImageBeginTag(array $a_attribs)
itemFeedbackBeginTag(array $a_attribs)
setVarBeginTag(array $a_attribs)
termsAndDefinitionsBeginTag(string $a_name, array $a_attribs)
renderFibBeginTag(array $a_attribs)
varEqualBeginTag(array $a_attribs)
assessmentBeginTag(array $a_attribs)
renderHotspotBeginTag(array $a_attribs)
Class ilQTIPresentationMaterial.

References assessmentBeginTag(), assessmentControlBeginTag(), decVarBeginTag(), displayFeedbackBeginTag(), itemBeginTag(), itemFeedbackBeginTag(), matAppletBeginTag(), materialBeginTag(), matImageBeginTag(), matTextBeginTag(), renderChoiceBeginTag(), renderFibBeginTag(), renderHotspotBeginTag(), responseLabelBeginTag(), ilQTIResponseVar\RESPONSEVAR_GT, ilQTIResponseVar\RESPONSEVAR_GTE, ilQTIResponseVar\RESPONSEVAR_INSIDE, ilQTIResponseVar\RESPONSEVAR_LT, ilQTIResponseVar\RESPONSEVAR_LTE, ilQTIResponseVar\RESPONSEVAR_SUBSET, ilQTIResponseVar\RESPONSEVAR_SUBSTRING, resprocessingBeginTag(), setVarBeginTag(), termsAndDefinitionsBeginTag(), and varEqualBeginTag().

Referenced by handlerBeginTag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handlerParseCharacterData()

ilQTIParser::handlerParseCharacterData (   $a_xml_parser,
string  $a_data 
)
Parameters
XMLParser | resource$a_xml_parser

Definition at line 919 of file class.ilQTIParser.php.

919 : void
920 {
921 if ($this->do_nothing) {
922 return;
923 }
924 $this->characterbuffer .= $a_data;
925 $a_data = $this->characterbuffer;
926 switch ($this->qti_element) {
927 case "fieldlabel":
928 $this->metadata["label"] = $a_data;
929 break;
930 case "fieldentry":
931 $this->metadata["entry"] = $a_data;
932 break;
933 case "response_label":
934 if ($this->response_label != null) {
935 $this->response_label->setContent($a_data);
936 }
937 break;
938 case "setvar":
939 if ($this->setvar != null) {
940 $this->setvar->setContent($a_data);
941 }
942 break;
943 case "displayfeedback":
944 if ($this->displayfeedback != null) {
945 $this->displayfeedback->setContent($a_data);
946 }
947 break;
948 case "varequal":
949 case "varlt":
950 case "varlte":
951 case "vargt":
952 case "vargte":
953 case "varsubset":
954 case "varinside":
955 case "varsubstring":
956 if ($this->responsevar != null) {
957 $this->responsevar->setContent($a_data);
958 }
959 break;
960 case "decvar":
961 if (strlen($a_data)) {
962 if ($this->decvar != null) {
963 $this->decvar->setContent($a_data);
964 }
965 }
966 break;
967 case "mattext":
968 if ($this->mattext != null) {
969 $this->mattext->setContent($a_data);
970 }
971 break;
972 case "matapplet":
973 if ($this->matapplet != null) {
974 $this->matapplet->setContent($a_data);
975 }
976 break;
977 case "matimage":
978 if ($this->matimage != null) {
979 $this->matimage->setContent($a_data);
980 }
981 break;
982 case "duration":
983 switch ($this->getParent($a_xml_parser)) {
984 case "assessment":
985 // to be done
986 break;
987 case "section":
988 // to be done
989 break;
990 case "item":
991 $this->item->setDuration($a_data);
992 break;
993 }
994 break;
995 case "qticomment":
996 switch ($this->getParent($a_xml_parser)) {
997 case "item":
998 $this->item->setComment($a_data);
999 break;
1000 case "assessment":
1001 $this->assessment->setComment($a_data);
1002 break;
1003 default:
1004 break;
1005 }
1006 break;
1007 }
1008 $this->sametag = true;
1009 }
getParent($a_xml_parser)

References $characterbuffer, and getParent().

Referenced by handlerCharacterData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handlerParseEndTag()

ilQTIParser::handlerParseEndTag (   $a_xml_parser,
string  $a_name 
)

@noinspection NotOptimalIfConditionsInspection

Parameters
XMLParser | resource$a_xml_parser

Definition at line 574 of file class.ilQTIParser.php.

574 : void
575 {
576 if ($this->do_nothing && strtolower($a_name) !== "item") {
577 return;
578 }
579 switch (strtolower($a_name)) {
580 case "assessment":
581 if (is_object($this->tst_object)) {
582 $this->tst_object->fromXML($this->assessment, $this->mappings);
583 }
584 $this->in_assessment = false;
585 break;
586 case "assessmentcontrol":
587 $this->assessment->addAssessmentcontrol($this->assessmentcontrol);
588 $this->assessmentcontrol = null;
589 break;
590 case "objectives":
591 if (strtolower($this->getParent($a_xml_parser)) === "assessment") {
592 $this->assessment->addObjectives($this->objectives);
593 }
594 $this->in_objectives = false;
595 break;
596 case 'presentation_material':
597 $this->assessment->setPresentationMaterial($this->prensentation_material);
598 $this->in_prensentation_material = false;
599 break;
600 case "itemmetadata":
601 $this->in_itemmetadata = false;
602 break;
603 case "qtimetadatafield":
604 // handle only specific ILIAS metadata
605 switch ($this->metadata["label"]) {
606 case "ILIAS_VERSION":
607 if ($this->item !== null) {
608 $this->item->setIliasSourceVersion(
609 $this->fetchNumericVersionFromVersionDateString($this->metadata["entry"])
610 );
611 }
612 break;
613 case "QUESTIONTYPE":
614 if ($this->item !== null) {
615 $this->item->setQuestiontype($this->metadata["entry"]);
616 }
617 break;
618 case "AUTHOR":
619 if ($this->item !== null) {
620 $this->item->setAuthor($this->metadata["entry"]);
621 }
622 // no break
623 default:
624 if ($this->item !== null) {
625 $this->item->addMetadata($this->metadata);
626 }
627 break;
628 }
629 if ($this->in_assessment) {
630 $this->assessment->addQtiMetadata($this->metadata);
631 }
632 $this->metadata = ["label" => "", "entry" => ""];
633 break;
634 case "fieldentry":
635 $label = $this->metadata["label"];
636 if ($label === "unit_categories") {
637 $this->item?->addUnitCategory($this->metadata["entry"], $this->attributes);
638 break;
639 }
640
641 if ($label === "units") {
642 $this->item?->addUnit($this->metadata["entry"], $this->attributes);
643 break;
644 }
645
646 break;
647 case "flow":
648 $this->flow--;
649 break;
650 case "flow_mat":
651 if (count($this->flow_mat)) {
652 $flow_mat = array_pop($this->flow_mat);
653 if (count($this->flow_mat)) {
654 $this->flow_mat[count($this->flow_mat) - 1]->addFlowMat($flow_mat);
655 } elseif ($this->in_prensentation_material) {
656 $this->prensentation_material->addFlowMat($flow_mat);
657 } elseif ($this->itemfeedback != null) {
658 $this->itemfeedback->addFlowMat($flow_mat);
659 } elseif ($this->response_label != null) {
660 $this->response_label->addFlow_mat($flow_mat);
661 }
662 }
663 break;
664 case "itemfeedback":
665 if ($this->item != null) {
666 if ($this->itemfeedback != null) {
667 $this->item->addItemfeedback($this->itemfeedback);
668 }
669 }
670 $this->itemfeedback = null;
671 break;
672 case "displayfeedback":
673 if ($this->respcondition != null) {
674 if ($this->displayfeedback != null) {
675 $this->respcondition->addDisplayfeedback($this->displayfeedback);
676 }
677 }
678 $this->displayfeedback = null;
679 break;
680 case "setvar":
681 if ($this->respcondition !== null) {
682 if ($this->setvar != null) {
683 $this->respcondition->addSetvar($this->setvar);
684 }
685 }
686 $this->setvar = null;
687 break;
688 case "conditionvar":
689 if ($this->respcondition !== null) {
690 $this->respcondition->setConditionvar($this->conditionvar);
691 }
692 $this->conditionvar = null;
693 break;
694 case "varequal":
695 case "varlt":
696 case "varlte":
697 case "vargt":
698 case "vargte":
699 case "varsubset":
700 case "varinside":
701 case "varsubstring":
702 if ($this->conditionvar != null) {
703 if ($this->responsevar != null) {
704 $this->conditionvar->addResponseVar($this->responsevar);
705 }
706 }
707 $this->responsevar = null;
708 break;
709 case "respcondition":
710 if ($this->resprocessing != null) {
711 $this->resprocessing->addRespcondition($this->respcondition);
712 }
713 $this->respcondition = null;
714 break;
715 case "outcomes":
716 if ($this->resprocessing != null) {
717 $this->resprocessing->setOutcomes($this->outcomes);
718 }
719 $this->outcomes = null;
720 break;
721 case "decvar":
722 if ($this->outcomes != null) {
723 $this->outcomes->addDecvar($this->decvar);
724 }
725 $this->decvar = null;
726 break;
727 case "presentation":
728 $this->in_presentation = false;
729 if ($this->presentation != null && $this->item != null) {
730 $this->item->setPresentation($this->presentation);
731 }
732 $this->presentation = null;
733 break;
734 case "response_label":
735 if ($this->render_type != null) {
736 $this->render_type->addResponseLabel($this->response_label);
737 $this->response_label = null;
738 }
739 break;
740 case "render_choice":
741 case "render_hotspot":
742 case "render_fib":
743 if ($this->in_response) {
744 if ($this->response != null) {
745 if ($this->render_type != null) {
746 $this->response->setRenderType($this->render_type);
747 $this->render_type = null;
748 }
749 }
750 }
751 break;
752 case "response_lid":
753 case "response_xy":
754 case "response_str":
755 case "response_num":
756 case "response_grp":
757 $this->gap_index++;
758 if ($this->presentation != null) {
759 if ($this->response != null) {
760 $this->presentation->addResponse($this->response);
761 if ($this->item != null) {
762 $this->item->addPresentationitem($this->response);
763 }
764 }
765 }
766 $this->response = null;
767 $this->in_response = false;
768 break;
769 case "item":
770 if ($this->do_nothing) {
771 $this->do_nothing = false;
772 return;
773 }
774 // save the item directly to save memory
775 // the database id's of the created items are exported. if the import fails
776 // ILIAS can delete the already imported items
777
778 // problems: the object id of the parent questionpool is not yet known. must be set later
779 // the complete flag must be calculated?
780 $qt = $this->item->determineQuestionType();
781 $presentation = $this->item->getPresentation();
782
784 return;
785 }
786
787 $question = new $qt();
788 $fbt = str_replace('ass', 'ilAss', $qt) . 'Feedback';
789 $question->feedbackOBJ = new $fbt(
790 $question,
791 $GLOBALS['ilCtrl'],
792 $GLOBALS['ilDB'],
793 $GLOBALS['lng']
794 );
795 $this->import_mapping = $question->fromXML(
796 $this->importdir,
797 $this->user_id,
798 $this->item,
799 $this->qpl_id,
800 $this->tst_id,
801 $this->tst_object,
802 $this->question_counter,
803 $this->import_mapping,
804 );
805
806 $this->numImportedItems++;
807
808 break;
809 case "material":
810 if ($this->material) {
811 $mat = $this->material->getMaterial(0);
812 if (!is_array($mat)) {
813 $this->material = null;
814 break;
815 }
816 if ($mat["type"] === "mattext" && $mat["material"]->getLabel() === "suggested_solution") {
817 $this->item->addSuggestedSolution($mat["material"], $this->gap_index);
818 }
819 if ($this->in_objectives) {
820 $this->objectives->addMaterial($this->material);
821 } elseif ($this->render_type != null && strtolower($this->getParent($a_xml_parser)) === "render_hotspot") {
822 $this->render_type->addMaterial($this->material);
823 } elseif (count($this->flow_mat) && strtolower($this->getParent($a_xml_parser)) === "flow_mat") {
824 $this->flow_mat[count($this->flow_mat) - 1]->addMaterial($this->material);
825 } elseif ($this->itemfeedback != null) {
826 $this->itemfeedback->addMaterial($this->material);
827 } elseif ($this->response_label != null) {
828 $this->response_label->addMaterial($this->material);
829 } elseif ($this->response != null) {
830 if ($this->response->hasRendering()) {
831 $this->response->setMaterial2($this->material);
832 } else {
833 $this->response->setMaterial1($this->material);
834 }
835 } elseif (($this->in_presentation) && (!$this->in_response)) {
836 if (!is_object($this->item->getQuestiontext())) {
837 $this->item->setQuestiontext($this->material);
838 }
839 $this->presentation->addMaterial($this->material);
840 } elseif ($this->presentation != null) {
841 $this->presentation->addMaterial($this->material);
842 if ($this->item != null) {
843 $this->item->addPresentationitem($this->material);
844 }
845 }
846 }
847 $this->material = null;
848 break;
849 case "matimage":
850
851 if (!$this->isMatImageAvailable()) {
852 break;
853 }
854
855 if ($this->virusDetected($this->matimage->getRawContent())) {
856 break;
857 }
858 try {
859 $matImageSecurity = new ilQtiMatImageSecurity($this->matimage, $this->questionfiles);
860 $matImageSecurity->sanitizeLabel();
861 } catch (Exception $e) {
862 break;
863 }
864 if (!$matImageSecurity->validate()) {
865 break;
866 }
867
868 $this->material->addMatimage($this->matimage);
869 $this->matimage = null;
870 break;
871
872 // add support for matbreak element
873 case "matbreak":
874 $this->mattext = new ilQTIMattext();
875 $this->mattext->setContent('<br />');
876 $this->material->addMattext($this->mattext);
877 $this->mattext = null;
878 break;
879 case "resprocessing":
880 if ($this->item != null) {
881 $this->item->addResprocessing($this->resprocessing);
882 }
883 $this->resprocessing = null;
884 break;
885 case "mattext":
886 if ($this->material != null) {
887 $this->material->addMattext($this->mattext);
888 }
889 $this->mattext = null;
890 break;
891 case "matapplet":
892 if ($this->material != null) {
893 $this->material->addMatapplet($this->matapplet);
894 }
895 $this->matapplet = null;
896 break;
897 }
898 $this->depth[$a_xml_parser] -= 1; // Issue with SplObjectStorage: Cannot use --.
899 }
static isImportable($questionTypeTag)
fetchNumericVersionFromVersionDateString(string $versionDateString)
ilQTIPresentation $presentation
virusDetected(string $buffer)
$GLOBALS["DIC"]
Definition: wac.php:54

References Vendor\Package\$e, $flow_mat, $GLOBALS, $presentation, fetchNumericVersionFromVersionDateString(), ILIAS\Test\Questions\Presentation\getLabel, getParent(), ilAssQuestionTypeList\isImportable(), isMatImageAvailable(), and virusDetected().

Referenced by handlerEndTag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handlerVerifyBeginTag()

ilQTIParser::handlerVerifyBeginTag (   $a_xml_parser,
string  $a_name,
array  $a_attribs 
)
Parameters
XMLParser | resource$a_xml_parser
array<string,string>$a_attribs

Definition at line 1015 of file class.ilQTIParser.php.

1015 : void
1016 {
1017 $this->qti_element = $a_name;
1018
1019 switch (strtolower($a_name)) {
1020 case "assessment":
1021 $this->assessment = $this->assessments[] = new ilQTIAssessment();
1022 $this->in_assessment = true;
1023 foreach ($a_attribs as $attribute => $value) {
1024 switch (strtolower($attribute)) {
1025 case "title":
1026 $this->assessment->setTitle($value);
1027 break;
1028 case "ident":
1029 $this->assessment->setIdent($value);
1030 break;
1031 }
1032 }
1033 break;
1034 case "questestinterop":
1035 $this->verifyroot = true;
1036 break;
1037 case "qtimetadatafield":
1038 $this->metadata = ["label" => "", "entry" => ""];
1039 $this->verifymetadatafield = 1;
1040 break;
1041 case "fieldlabel":
1042 $this->verifyfieldlabeltext = "";
1043 if ($this->verifymetadatafield == 1) {
1044 $this->verifyfieldlabel = 1;
1045 }
1046 break;
1047 case "fieldentry":
1048 $this->verifyfieldentrytext = "";
1049 if ($this->verifymetadatafield == 1) {
1050 $this->verifyfieldentry = 1;
1051 }
1052 break;
1053 case "item":
1054 $title = "";
1055 foreach ($a_attribs as $attribute => $value) {
1056 switch (strtolower($attribute)) {
1057 case "title":
1058 $title = $value;
1059 break;
1060 }
1061 }
1062 $this->founditems[] = ["title" => "$title", "type" => "", "ident" => $a_attribs["ident"]];
1063 break;
1064 case "response_lid":
1065 if ($this->founditems[count($this->founditems) - 1]['type'] === '') {
1066 // test for non ILIAS generated question types
1067 foreach ($a_attribs as $attribute => $value) {
1068 switch (strtolower($attribute)) {
1069 case "rcardinality":
1070 switch (strtolower($value)) {
1071 case "single":
1072 $this->founditems[count($this->founditems) - 1]["type"] = ilQTIItem::QT_MULTIPLE_CHOICE_SR;
1073 break;
1074 case "multiple":
1075 $this->founditems[count($this->founditems) - 1]["type"] = ilQTIItem::QT_MULTIPLE_CHOICE_MR;
1076 break;
1077 case "ordered":
1078 $this->founditems[count($this->founditems) - 1]["type"] = ilQTIItem::QT_ORDERING;
1079 break;
1080 }
1081 break;
1082 }
1083 }
1084 }
1085 break;
1086
1087 case "response_str":
1088 if (strlen($this->founditems[count($this->founditems) - 1]["type"]) == 0) {
1089 // test for non ILIAS generated question types
1090 foreach ($a_attribs as $attribute => $value) {
1091 switch (strtolower($attribute)) {
1092 case "rcardinality":
1093 switch (strtolower($value)) {
1094 case "single":
1095 $this->founditems[count($this->founditems) - 1]["type"] = ilQTIItem::QT_CLOZE;
1096 break;
1097 case "ordered":
1098 $this->founditems[count($this->founditems) - 1]["type"] = ilQTIItem::QT_TEXT;
1099 break;
1100 }
1101 break;
1102 }
1103 }
1104 }
1105 break;
1106 case "response_xy":
1107 if (strlen($this->founditems[count($this->founditems) - 1]["type"]) == 0) {
1108 $this->founditems[count($this->founditems) - 1]["type"] = ilQTIItem::QT_IMAGEMAP;
1109 }
1110 break;
1111 case "response_num":
1112 if (strlen($this->founditems[count($this->founditems) - 1]["type"]) == 0) {
1113 $this->founditems[count($this->founditems) - 1]["type"] = ilQTIItem::QT_NUMERIC;
1114 }
1115 break;
1116 case "response_grp":
1117 if (strlen($this->founditems[count($this->founditems) - 1]["type"]) == 0) {
1118 $this->founditems[count($this->founditems) - 1]["type"] = ilQTIItem::QT_MATCHING;
1119 }
1120 break;
1121 case "qticomment":
1122 // check for "old" ILIAS qti format (not well formed)
1123 $this->verifyqticomment = 1;
1124 break;
1125 case "presentation":
1126 foreach ($a_attribs as $attribute => $value) {
1127 switch (strtolower($attribute)) {
1128 case "label":
1129 $this->founditems[count($this->founditems) - 1]["title"] = $value;
1130 break;
1131 }
1132 }
1133 break;
1134 }
1135 }
const QT_MULTIPLE_CHOICE_MR
const QT_MULTIPLE_CHOICE_SR
const QT_NUMERIC
const QT_MATCHING
const QT_ORDERING
const QT_IMAGEMAP

References ilQTIItem\QT_CLOZE, ilQTIItem\QT_IMAGEMAP, ilQTIItem\QT_MATCHING, ilQTIItem\QT_MULTIPLE_CHOICE_MR, ilQTIItem\QT_MULTIPLE_CHOICE_SR, ilQTIItem\QT_NUMERIC, ilQTIItem\QT_ORDERING, and ilQTIItem\QT_TEXT.

Referenced by handlerBeginTag().

+ Here is the caller graph for this function:

◆ handlerVerifyCharacterData()

ilQTIParser::handlerVerifyCharacterData (   $a_xml_parser,
string  $a_data 
)
Parameters
XMLParser | resource$a_xml_parser

Definition at line 1187 of file class.ilQTIParser.php.

1187 : void
1188 {
1189 if ($this->verifyqticomment == 1) {
1190 if (preg_match("/Questiontype\=(.*)/", $a_data, $matches)) {
1191 if (count($this->founditems)) {
1192 $this->founditems[count($this->founditems) - 1]["type"] = $matches[1];
1193 }
1194 }
1195 } elseif ($this->verifyfieldlabel == 1) {
1196 $this->verifyfieldlabeltext = $a_data;
1197 } elseif ($this->verifyfieldentry == 1) {
1198 $this->verifyfieldentrytext = $a_data;
1199 }
1200
1201 switch ($this->qti_element) {
1202 case "fieldlabel":
1203 $this->metadata["label"] = $a_data;
1204 break;
1205 case "fieldentry":
1206 $this->metadata["entry"] = $a_data;
1207 break;
1208 }
1209 }

Referenced by handlerCharacterData().

+ Here is the caller graph for this function:

◆ handlerVerifyEndTag()

ilQTIParser::handlerVerifyEndTag (   $a_xml_parser,
string  $a_name 
)
Parameters
XMLParser | resource$a_xml_parser

Definition at line 1140 of file class.ilQTIParser.php.

1140 : void
1141 {
1142 switch (strtolower($a_name)) {
1143 case "assessment":
1144 foreach ($this->assessment->qtimetadata as $metaField) {
1145 if ($metaField['label'] == 'question_set_type') {
1146 $this->setQuestionSetType($metaField['entry']);
1147 break;
1148 }
1149
1150 if ($metaField['label'] == 'random_test') {
1151 if ($metaField['entry'] == 1) {
1153 } else {
1155 }
1156 break;
1157 }
1158 }
1159 $this->in_assessment = false;
1160 break;
1161 case "qticomment":
1162 // check for "old" ILIAS qti format (not well formed)
1163 $this->verifyqticomment = 0;
1164 break;
1165 case "qtimetadatafield":
1166 $this->verifymetadatafield = 0;
1167 if ($this->verifyfieldlabeltext === "QUESTIONTYPE") {
1168 $this->founditems[count($this->founditems) - 1]["type"] = $this->verifyfieldentrytext;
1169 }
1170 if ($this->in_assessment) {
1171 $this->assessment->addQtiMetadata($this->metadata);
1172 }
1173 $this->metadata = ["label" => "", "entry" => ""];
1174 break;
1175 case "fieldlabel":
1176 $this->verifyfieldlabel = 0;
1177 break;
1178 case "fieldentry":
1179 $this->verifyfieldentry = 0;
1180 break;
1181 }
1182 }
const QUESTION_SET_TYPE_RANDOM
const QUESTION_SET_TYPE_FIXED
setQuestionSetType(string $questionSetType)
string $verifyfieldentrytext

References $verifyfieldentrytext, ilObjTest\QUESTION_SET_TYPE_FIXED, ilObjTest\QUESTION_SET_TYPE_RANDOM, and setQuestionSetType().

Referenced by handlerEndTag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isIgnoreItemsEnabled()

ilQTIParser::isIgnoreItemsEnabled ( )

Definition at line 220 of file class.ilQTIParser.php.

220 : bool
221 {
223 }

References $ignoreItemsEnabled.

Referenced by itemBeginTag().

+ Here is the caller graph for this function:

◆ isMatImageAvailable()

ilQTIParser::isMatImageAvailable ( )
protected

Definition at line 1322 of file class.ilQTIParser.php.

1322 : bool
1323 {
1324 if (!$this->material) {
1325 return false;
1326 }
1327
1328 if (!$this->matimage) {
1329 return false;
1330 }
1331
1332 return true;
1333 }

Referenced by handlerParseEndTag().

+ Here is the caller graph for this function:

◆ itemBeginTag()

ilQTIParser::itemBeginTag ( array  $a_attribs)
private

Definition at line 1484 of file class.ilQTIParser.php.

1484 : void
1485 {
1486 $this->gap_index = 0;
1487 $this->item = $this->items[] = new ilQTIItem();
1488 foreach ($a_attribs as $attribute => $value) {
1489 switch (strtolower($attribute)) {
1490 case "ident":
1491 $this->item->setIdent($value);
1492 $this->item->setIliasSourceNic(
1493 $this->fetchSourceNicFromItemIdent($value)
1494 );
1495 if ($this->isIgnoreItemsEnabled()) {
1496 $this->do_nothing = true;
1497 } elseif ($this->import_idents !== []
1498 && !in_array($value, $this->import_idents)) {
1499 $this->do_nothing = true;
1500 }
1501 break;
1502 case "title":
1503 $this->item->setTitle($value);
1504 break;
1505 case "maxattempts":
1506 $this->item->setMaxattempts($value);
1507 break;
1508 }
1509 }
1510 }
fetchSourceNicFromItemIdent(string $itemIdent)

References fetchSourceNicFromItemIdent(), and isIgnoreItemsEnabled().

Referenced by handlerParseBeginTag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ itemFeedbackBeginTag()

ilQTIParser::itemFeedbackBeginTag ( array  $a_attribs)
private

Definition at line 1380 of file class.ilQTIParser.php.

1380 : void
1381 {
1382 $this->itemfeedback = new ilQTIItemfeedback();
1383 foreach ($a_attribs as $attribute => $value) {
1384 switch (strtolower($attribute)) {
1385 case "ident":
1386 $this->itemfeedback->setIdent($value);
1387 break;
1388 case "view":
1389 $this->itemfeedback->setView($value);
1390 break;
1391 }
1392 }
1393 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ matAppletBeginTag()

ilQTIParser::matAppletBeginTag ( array  $a_attribs)
private

Definition at line 1638 of file class.ilQTIParser.php.

1638 : void
1639 {
1640 $this->matapplet = new ilQTIMatapplet();
1641 foreach ($a_attribs as $attribute => $value) {
1642 switch (strtolower($attribute)) {
1643 case "label":
1644 $this->matapplet->setLabel($value);
1645 break;
1646 case "uri":
1647 $this->matapplet->setUri($value);
1648 break;
1649 case "y0":
1650 $this->matapplet->setY0($value);
1651 break;
1652 case "height":
1653 $this->matapplet->setHeight($value);
1654 break;
1655 case "width":
1656 $this->matapplet->setWidth($value);
1657 break;
1658 case "x0":
1659 $this->matapplet->setX0($value);
1660 break;
1661 case "embedded":
1662 $this->matapplet->setEmbedded($value);
1663 break;
1664 case "entityref":
1665 $this->matapplet->setEntityref($value);
1666 break;
1667 }
1668 }
1669 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ materialBeginTag()

ilQTIParser::materialBeginTag ( array  $a_attribs)
private

Definition at line 1713 of file class.ilQTIParser.php.

1713 : void
1714 {
1715 $this->material = new ilQTIMaterial();
1716 $this->material->setFlow($this->flow);
1717 foreach ($a_attribs as $attribute => $value) {
1718 switch (strtolower($attribute)) {
1719 case "label":
1720 $this->material->setLabel($value);
1721 break;
1722 }
1723 }
1724 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ matImageBeginTag()

ilQTIParser::matImageBeginTag ( array  $a_attribs)
private

Definition at line 1726 of file class.ilQTIParser.php.

1726 : void
1727 {
1728 $this->matimage = new ilQTIMatimage();
1729 foreach ($a_attribs as $attribute => $value) {
1730 switch (strtolower($attribute)) {
1731 case "imagtype":
1732 $this->matimage->setImagetype($value);
1733 break;
1734 case "label":
1735 $this->matimage->setLabel($value);
1736 break;
1737 case "height":
1738 $this->matimage->setHeight($value);
1739 break;
1740 case "width":
1741 $this->matimage->setWidth($value);
1742 break;
1743 case "uri":
1744 $this->matimage->setUri($value);
1745 break;
1746 case "embedded":
1747 $this->matimage->setEmbedded($value);
1748 break;
1749 case "x0":
1750 $this->matimage->setX0($value);
1751 break;
1752 case "y0":
1753 $this->matimage->setY0($value);
1754 break;
1755 case "entityref":
1756 $this->matimage->setEntityref($value);
1757 break;
1758 }
1759 }
1760 if (!$this->matimage->getEmbedded() && strlen($this->matimage->getUri())) {
1761 $img_string = @file_get_contents(dirname($this->xml_file) . '/' . $this->matimage->getUri());
1762
1763 if (is_string($img_string)) {
1764 $this->matimage->setContent($img_string);
1765 }
1766 }
1767 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ matTextBeginTag()

ilQTIParser::matTextBeginTag ( array  $a_attribs)
private

Definition at line 1671 of file class.ilQTIParser.php.

1671 : void
1672 {
1673 $this->mattext = new ilQTIMattext();
1674 foreach ($a_attribs as $attribute => $value) {
1675 switch (strtolower($attribute)) {
1676 case "texttype":
1677 $this->mattext->setTexttype($value);
1678 break;
1679 case "label":
1680 $this->mattext->setLabel($value);
1681 break;
1682 case "charset":
1683 $this->mattext->setCharset($value);
1684 break;
1685 case "uri":
1686 $this->mattext->setUri($value);
1687 break;
1688 case "xml:space":
1689 $this->mattext->setXmlspace($value);
1690 break;
1691 case "xml:lang":
1692 $this->mattext->setXmllang($value);
1693 break;
1694 case "entityref":
1695 $this->mattext->setEntityref($value);
1696 break;
1697 case "height":
1698 $this->mattext->setHeight($value);
1699 break;
1700 case "width":
1701 $this->mattext->setWidth($value);
1702 break;
1703 case "x0":
1704 $this->mattext->setX0($value);
1705 break;
1706 case "y0":
1707 $this->mattext->setY0($value);
1708 break;
1709 }
1710 }
1711 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ openXMLFile()

ilQTIParser::openXMLFile ( )
protected

Returns
resource
Exceptions
ilSaxParserException

Reimplemented from ilSaxParser.

Definition at line 1255 of file class.ilQTIParser.php.

1256 {
1257 $xmlContent = file_get_contents($this->xml_file);
1258 $xmlContent = $this->cleanInvalidXmlChars($xmlContent);
1259 file_put_contents($this->xml_file, $xmlContent);
1260
1261 return parent::openXMLFile();
1262 }
cleanInvalidXmlChars(string $xmlContent)

References cleanInvalidXmlChars().

+ Here is the call graph for this function:

◆ renderChoiceBeginTag()

ilQTIParser::renderChoiceBeginTag ( array  $a_attribs)
private

Definition at line 1584 of file class.ilQTIParser.php.

1584 : void
1585 {
1586 if (!$this->in_response) {
1587 return;
1588 }
1589 $this->render_type = new ilQTIRenderChoice();
1590 foreach ($a_attribs as $attribute => $value) {
1591 switch (strtolower($attribute)) {
1592 case "shuffle":
1593 $this->render_type->setShuffle($value);
1594 break;
1595 case 'minnumber':
1596 $this->render_type->setMinnumber($value);
1597 break;
1598 case 'maxnumber':
1599 $this->render_type->setMaxnumber($value);
1600 break;
1601 }
1602 }
1603 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ renderFibBeginTag()

ilQTIParser::renderFibBeginTag ( array  $a_attribs)
private

Definition at line 1524 of file class.ilQTIParser.php.

1524 : void
1525 {
1526 if (!$this->in_response) {
1527 return;
1528 }
1529 $this->render_type = new ilQTIRenderFib();
1530 foreach ($a_attribs as $attribute => $value) {
1531 switch (strtolower($attribute)) {
1532 case "encoding":
1533 $this->render_type->setEncoding($value);
1534 break;
1535 case "fibtype":
1536 $this->render_type->setFibtype($value);
1537 break;
1538 case "rows":
1539 $this->render_type->setRows($value);
1540 break;
1541 case "maxchars":
1542 $this->render_type->setMaxchars($value);
1543 break;
1544 case "prompt":
1545 $this->render_type->setPrompt($value);
1546 break;
1547 case "columns":
1548 $this->render_type->setColumns($value);
1549 break;
1550 case "charset":
1551 $this->render_type->setCharset($value);
1552 break;
1553 case "maxnumber":
1554 $this->render_type->setMaxnumber($value);
1555 break;
1556 case "minnumber":
1557 $this->render_type->setMinnumber($value);
1558 break;
1559 }
1560 }
1561 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ renderHotspotBeginTag()

ilQTIParser::renderHotspotBeginTag ( array  $a_attribs)
private

Definition at line 1563 of file class.ilQTIParser.php.

1563 : void
1564 {
1565 if (!$this->in_response) {
1566 return;
1567 }
1568 $this->render_type = new ilQTIRenderHotspot();
1569 foreach ($a_attribs as $attribute => $value) {
1570 switch (strtolower($attribute)) {
1571 case "showdraw":
1572 $this->render_type->setShowdraw($value);
1573 break;
1574 case "minnumber":
1575 $this->render_type->setMinnumber($value);
1576 break;
1577 case "maxnumber":
1578 $this->render_type->setMaxnumber($value);
1579 break;
1580 }
1581 }
1582 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ responseLabelBeginTag()

ilQTIParser::responseLabelBeginTag ( array  $a_attribs)
private

Definition at line 1605 of file class.ilQTIParser.php.

1605 : void
1606 {
1607 if ($this->render_type == null) {
1608 return;
1609 }
1610 $this->response_label = new ilQTIResponseLabel();
1611 foreach ($a_attribs as $attribute => $value) {
1612 switch (strtolower($attribute)) {
1613 case "rshuffle":
1614 $this->response_label->setRshuffle($value);
1615 break;
1616 case "rarea":
1617 $this->response_label->setRarea($value);
1618 break;
1619 case "rrange":
1620 $this->response_label->setRrange($value);
1621 break;
1622 case "labelrefid":
1623 $this->response_label->setLabelrefid($value);
1624 break;
1625 case "ident":
1626 $this->response_label->setIdent($value);
1627 break;
1628 case "match_group":
1629 $this->response_label->setMatchGroup($value);
1630 break;
1631 case "match_max":
1632 $this->response_label->setMatchMax($value);
1633 break;
1634 }
1635 }
1636 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ resprocessingBeginTag()

ilQTIParser::resprocessingBeginTag ( array  $a_attribs)
private

Definition at line 1512 of file class.ilQTIParser.php.

1512 : void
1513 {
1514 $this->resprocessing = new ilQTIResprocessing();
1515 foreach ($a_attribs as $attribute => $value) {
1516 switch (strtolower($attribute)) {
1517 case "scoremodel":
1518 $this->resprocessing->setScoremodel($value);
1519 break;
1520 }
1521 }
1522 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ setHandlers()

ilQTIParser::setHandlers (   $a_xml_parser)

set event handler should be overwritten by inherited class @access private

Parameters
XMLParser | resource$a_xml_parser

Reimplemented from ilSaxParser.

Definition at line 258 of file class.ilQTIParser.php.

258 : void
259 {
260 xml_set_element_handler($a_xml_parser, $this->handlerBeginTag(...), $this->handlerEndTag(...));
261 xml_set_character_data_handler($a_xml_parser, $this->handlerCharacterData(...));
262 }
handlerCharacterData($a_xml_parser, string $a_data)
handlerBeginTag($a_xml_parser, string $a_name, array $a_attribs)
handlerEndTag($a_xml_parser, string $a_name)

References handlerBeginTag(), handlerCharacterData(), and handlerEndTag().

+ Here is the call graph for this function:

◆ setIgnoreItemsEnabled()

ilQTIParser::setIgnoreItemsEnabled ( bool  $ignoreItemsEnabled)

Definition at line 225 of file class.ilQTIParser.php.

225 : void
226 {
227 $this->ignoreItemsEnabled = $ignoreItemsEnabled;
228 }

References $ignoreItemsEnabled.

◆ setQuestionSetType()

ilQTIParser::setQuestionSetType ( string  $questionSetType)
protected

Definition at line 235 of file class.ilQTIParser.php.

235 : void
236 {
237 $this->questionSetType = $questionSetType;
238 }

References $questionSetType.

Referenced by handlerVerifyEndTag().

+ Here is the caller graph for this function:

◆ setTestObject()

ilQTIParser::setTestObject ( ilObjTest  $tst_object)

Definition at line 240 of file class.ilQTIParser.php.

240 : void
241 {
242 $this->tst_object = $tst_object;
243 $this->tst_id = $this->tst_object->getId();
244 }

References $tst_object, and ilObject\getId().

+ Here is the call graph for this function:

◆ setVarBeginTag()

ilQTIParser::setVarBeginTag ( array  $a_attribs)
private

Definition at line 1410 of file class.ilQTIParser.php.

1410 : void
1411 {
1412 $this->setvar = new ilQTISetvar();
1413 foreach ($a_attribs as $attribute => $value) {
1414 switch (strtolower($attribute)) {
1415 case "action":
1416 $this->setvar->setAction($value);
1417 break;
1418 case "varname":
1419 $this->setvar->setVarname($value);
1420 break;
1421 }
1422 }
1423 }

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ setXMLContent()

ilQTIParser::setXMLContent ( string  $a_xml_content)

Reimplemented from ilSaxParser.

Definition at line 1245 of file class.ilQTIParser.php.

1245 : void
1246 {
1247 $a_xml_content = $this->cleanInvalidXmlChars($a_xml_content);
1248
1249 parent::setXMLContent($a_xml_content);
1250 }

References cleanInvalidXmlChars().

+ Here is the call graph for this function:

◆ startParsing()

ilQTIParser::startParsing ( )

stores xml data in array

Exceptions
ilSaxParserException

Reimplemented from ilSaxParser.

Definition at line 264 of file class.ilQTIParser.php.

264 : void
265 {
266 $this->question_counter = 1;
267 parent::startParsing();
268 }

◆ termsAndDefinitionsBeginTag()

ilQTIParser::termsAndDefinitionsBeginTag ( string  $a_name,
array  $a_attribs 
)
private

Definition at line 1443 of file class.ilQTIParser.php.

1443 : void
1444 {
1445 $response_type = 0;
1446 switch (strtolower($a_name)) {
1447 case "response_lid":
1448 $response_type = ilQTIResponse::RT_RESPONSE_LID;
1449 break;
1450 case "response_xy":
1451 $response_type = ilQTIResponse::RT_RESPONSE_XY;
1452 break;
1453 case "response_str":
1454 $response_type = ilQTIResponse::RT_RESPONSE_STR;
1455 break;
1456 case "response_num":
1457 $response_type = ilQTIResponse::RT_RESPONSE_NUM;
1458 break;
1459 case "response_grp":
1460 $response_type = ilQTIResponse::RT_RESPONSE_GRP;
1461 break;
1462 }
1463 $this->in_response = true;
1464 $this->response = new ilQTIResponse($response_type);
1465 $this->response->setFlow($this->flow);
1466 foreach ($a_attribs as $attribute => $value) {
1467 switch (strtolower($attribute)) {
1468 case "ident":
1469 $this->response->setIdent($value);
1470 break;
1471 case "rtiming":
1472 $this->response->setRTiming($value);
1473 break;
1474 case "rcardinality":
1475 $this->response->setRCardinality($value);
1476 break;
1477 case "numtype":
1478 $this->response->setNumtype($value);
1479 break;
1480 }
1481 }
1482 }

References ilQTIResponse\RT_RESPONSE_GRP, ilQTIResponse\RT_RESPONSE_LID, ilQTIResponse\RT_RESPONSE_NUM, ilQTIResponse\RT_RESPONSE_STR, and ilQTIResponse\RT_RESPONSE_XY.

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ varEqualBeginTag()

ilQTIParser::varEqualBeginTag ( array  $a_attribs)
private

Definition at line 1425 of file class.ilQTIParser.php.

1425 : void
1426 {
1427 $this->responsevar = new ilQTIResponseVar(ilQTIResponseVar::RESPONSEVAR_EQUAL);
1428 foreach ($a_attribs as $attribute => $value) {
1429 switch (strtolower($attribute)) {
1430 case "case":
1431 $this->responsevar->setCase($value);
1432 break;
1433 case "respident":
1434 $this->responsevar->setRespident($value);
1435 break;
1436 case "index":
1437 $this->responsevar->setIndex($value);
1438 break;
1439 }
1440 }
1441 }

References ilQTIResponseVar\RESPONSEVAR_EQUAL.

Referenced by handlerParseBeginTag().

+ Here is the caller graph for this function:

◆ virusDetected()

ilQTIParser::virusDetected ( string  $buffer)
protected

Definition at line 1335 of file class.ilQTIParser.php.

1335 : bool
1336 {
1338
1339 if ($vs === null) {
1340 return false; // no virus scan, no virus detected
1341 }
1342
1343 return $vs->scanBuffer($buffer);
1344 }

References ilVirusScannerFactory\_getInstance().

Referenced by handlerParseEndTag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $assessment

ilQTIAssessment ilQTIParser::$assessment = null

Definition at line 130 of file class.ilQTIParser.php.

◆ $assessmentcontrol

ilQTIAssessmentcontrol ilQTIParser::$assessmentcontrol = null

Definition at line 132 of file class.ilQTIParser.php.

◆ $assessments

array ilQTIParser::$assessments = []

Definition at line 128 of file class.ilQTIParser.php.

◆ $attributes

array ilQTIParser::$attributes = []
private

Definition at line 191 of file class.ilQTIParser.php.

◆ $characterbuffer

string ilQTIParser::$characterbuffer = ""

Definition at line 104 of file class.ilQTIParser.php.

Referenced by handlerParseCharacterData().

◆ $conditionvar

ilQTIConditionvar ilQTIParser::$conditionvar = null

Definition at line 106 of file class.ilQTIParser.php.

◆ $decvar

ilQTIDecvar ilQTIParser::$decvar = null

Definition at line 81 of file class.ilQTIParser.php.

◆ $depth

ilQTIParser::$depth

Definition at line 56 of file class.ilQTIParser.php.

◆ $displayfeedback

ilQTIDisplayfeedback ilQTIParser::$displayfeedback = null

Definition at line 87 of file class.ilQTIParser.php.

◆ $do_nothing

bool ilQTIParser::$do_nothing = false

Definition at line 121 of file class.ilQTIParser.php.

◆ $flow

int ilQTIParser::$flow = 0

Definition at line 96 of file class.ilQTIParser.php.

◆ $flow_mat

array ilQTIParser::$flow_mat = []

Definition at line 94 of file class.ilQTIParser.php.

Referenced by handlerParseEndTag().

◆ $founditems

array ilQTIParser::$founditems = []

Definition at line 154 of file class.ilQTIParser.php.

Referenced by getFoundItems().

◆ $gap_index

int ilQTIParser::$gap_index = 0

Definition at line 123 of file class.ilQTIParser.php.

◆ $hasRootElement

bool ilQTIParser::$hasRootElement = false

Definition at line 37 of file class.ilQTIParser.php.

◆ $ignoreItemsEnabled

bool ilQTIParser::$ignoreItemsEnabled = false
protected

Definition at line 176 of file class.ilQTIParser.php.

Referenced by isIgnoreItemsEnabled(), and setIgnoreItemsEnabled().

◆ $import_idents

array ilQTIParser::$import_idents = []

Definition at line 113 of file class.ilQTIParser.php.

◆ $import_mapping

array ilQTIParser::$import_mapping = []

Definition at line 143 of file class.ilQTIParser.php.

Referenced by getImportMapping().

◆ $in_assessment

bool ilQTIParser::$in_assessment = false

Definition at line 136 of file class.ilQTIParser.php.

◆ $in_itemmetadata

bool ilQTIParser::$in_itemmetadata = false

Definition at line 147 of file class.ilQTIParser.php.

◆ $in_objectives

bool ilQTIParser::$in_objectives = false

Definition at line 149 of file class.ilQTIParser.php.

◆ $in_prensentation_material

bool ilQTIParser::$in_prensentation_material = false
protected

Definition at line 174 of file class.ilQTIParser.php.

◆ $in_presentation

bool ilQTIParser::$in_presentation = false

Definition at line 60 of file class.ilQTIParser.php.

◆ $in_response

bool ilQTIParser::$in_response = false

Definition at line 62 of file class.ilQTIParser.php.

◆ $item

ilQTIItem ilQTIParser::$item = null

Definition at line 51 of file class.ilQTIParser.php.

◆ $itemfeedback

ilQTIItemfeedback ilQTIParser::$itemfeedback = null

Definition at line 89 of file class.ilQTIParser.php.

◆ $items

array ilQTIParser::$items = []

Definition at line 49 of file class.ilQTIParser.php.

◆ $matapplet

ilQTIMatapplet ilQTIParser::$matapplet = null
private

Definition at line 178 of file class.ilQTIParser.php.

◆ $material

ilQTIMaterial ilQTIParser::$material = null

Definition at line 71 of file class.ilQTIParser.php.

◆ $matimage

ilQTIMatimage ilQTIParser::$matimage = null

Definition at line 73 of file class.ilQTIParser.php.

◆ $mattext

ilQTIMattext ilQTIParser::$mattext = null

Definition at line 100 of file class.ilQTIParser.php.

◆ $metadata

array ilQTIParser::$metadata = ["label" => "", "entry" => ""]
private

Definition at line 183 of file class.ilQTIParser.php.

◆ $numImportedItems

int ilQTIParser::$numImportedItems = 0
protected

Definition at line 170 of file class.ilQTIParser.php.

Referenced by getNumImportedItems().

◆ $objectives

ilQTIObjectives ilQTIParser::$objectives = null

Definition at line 134 of file class.ilQTIParser.php.

◆ $outcomes

ilQTIOutcomes ilQTIParser::$outcomes = null

Definition at line 79 of file class.ilQTIParser.php.

◆ $parser_mode

int ilQTIParser::$parser_mode = 0

Definition at line 108 of file class.ilQTIParser.php.

◆ $path

array ilQTIParser::$path = []

Definition at line 44 of file class.ilQTIParser.php.

◆ $prensentation_material

ilQTIPresentationMaterial ilQTIParser::$prensentation_material = null
protected

Definition at line 172 of file class.ilQTIParser.php.

◆ $presentation

ilQTIPresentation ilQTIParser::$presentation = null

Definition at line 98 of file class.ilQTIParser.php.

Referenced by handlerParseEndTag().

◆ $qpl_id

int ilQTIParser::$qpl_id = 0

Definition at line 115 of file class.ilQTIParser.php.

◆ $qti_element

string ilQTIParser::$qti_element = ""

Definition at line 58 of file class.ilQTIParser.php.

◆ $question_counter

int ilQTIParser::$question_counter = 1

Definition at line 145 of file class.ilQTIParser.php.

◆ $questionfiles

QuestionFiles ilQTIParser::$questionfiles
protected

Definition at line 189 of file class.ilQTIParser.php.

◆ $questionSetType

string ilQTIParser::$questionSetType = null
protected

Definition at line 187 of file class.ilQTIParser.php.

Referenced by getQuestionSetType(), and setQuestionSetType().

◆ $render_type

ilQTIParser::$render_type = null

Definition at line 67 of file class.ilQTIParser.php.

◆ $respcondition

ilQTIRespcondition ilQTIParser::$respcondition = null

Definition at line 83 of file class.ilQTIParser.php.

◆ $response

ilQTIResponse ilQTIParser::$response = null

Definition at line 75 of file class.ilQTIParser.php.

◆ $response_label

ilQTIResponseLabel ilQTIParser::$response_label = null

Definition at line 69 of file class.ilQTIParser.php.

◆ $responsevar

ilQTIResponseVar ilQTIParser::$responsevar = null
private

Definition at line 185 of file class.ilQTIParser.php.

◆ $resprocessing

ilQTIResprocessing ilQTIParser::$resprocessing = null

Definition at line 77 of file class.ilQTIParser.php.

◆ $sametag

bool ilQTIParser::$sametag = false

Definition at line 102 of file class.ilQTIParser.php.

◆ $section

ilQTISection ilQTIParser::$section = null

Definition at line 138 of file class.ilQTIParser.php.

◆ $setvar

ilQTISetvar ilQTIParser::$setvar = null

Definition at line 85 of file class.ilQTIParser.php.

◆ $tst_id

int ilQTIParser::$tst_id = null

Definition at line 117 of file class.ilQTIParser.php.

◆ $tst_object

ilObjTest ilQTIParser::$tst_object = null

Definition at line 119 of file class.ilQTIParser.php.

Referenced by getTestObject(), and setTestObject().

◆ $user_id

readonly int ilQTIParser::$user_id
private

Definition at line 39 of file class.ilQTIParser.php.

◆ $verifyfieldentry

int ilQTIParser::$verifyfieldentry = 0

Definition at line 166 of file class.ilQTIParser.php.

◆ $verifyfieldentrytext

string ilQTIParser::$verifyfieldentrytext = ""

Definition at line 168 of file class.ilQTIParser.php.

Referenced by handlerVerifyEndTag().

◆ $verifyfieldlabel

int ilQTIParser::$verifyfieldlabel = 0

Definition at line 162 of file class.ilQTIParser.php.

◆ $verifyfieldlabeltext

string ilQTIParser::$verifyfieldlabeltext = ""

Definition at line 164 of file class.ilQTIParser.php.

◆ $verifymetadatafield

int ilQTIParser::$verifymetadatafield = 0

Definition at line 160 of file class.ilQTIParser.php.

◆ $verifyqticomment

int ilQTIParser::$verifyqticomment = 0

Definition at line 158 of file class.ilQTIParser.php.

◆ $verifyroot

bool ilQTIParser::$verifyroot = false

Definition at line 156 of file class.ilQTIParser.php.

◆ IL_MO_PARSE_QTI

const ilQTIParser::IL_MO_PARSE_QTI = 1

Definition at line 34 of file class.ilQTIParser.php.

Referenced by handlerBeginTag(), handlerCharacterData(), and handlerEndTag().

◆ IL_MO_VERIFY_QTI

const ilQTIParser::IL_MO_VERIFY_QTI = 2

The documentation for this class was generated from the following file: