ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 private More...
 
 startParsing ()
 
 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)
 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
 
 $solutionhints = []
 
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 = ""
 
array entry => ""]
 
- Data Fields inherited from ilSaxParser
string $xml_file
 
bool $throw_exception = false
 

Protected Member Functions

 setQuestionSetType (string $questionSetType)
 
 openXMLFile ()
 
 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

 $solutionhint = null
 
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" => ""
 
ilQTIResponseVar $responsevar = null
 

Detailed Description

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

Member Function Documentation

◆ assessmentBeginTag()

ilQTIParser::assessmentBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

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

◆ assessmentControlBeginTag()

ilQTIParser::assessmentControlBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

1360  : void
1361  {
1362  $this->assessmentcontrol = new ilQTIAssessmentcontrol();
1363  foreach ($a_attribs as $attribute => $value) {
1364  switch (strtolower($attribute)) {
1365  case "solutionswitch":
1366  $this->assessmentcontrol->setSolutionswitch($value);
1367  break;
1368  case "hintswitch":
1369  $this->assessmentcontrol->setHintswitch($value);
1370  break;
1371  case "feedbackswitch":
1372  $this->assessmentcontrol->setFeedbackswitch($value);
1373  break;
1374  }
1375  }
1376  }
+ Here is the caller graph for this function:

◆ cleanInvalidXmlChars()

ilQTIParser::cleanInvalidXmlChars ( string  $xmlContent)
protected

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

Referenced by openXMLFile(), and setXMLContent().

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

◆ createParserStorage()

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

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

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

◆ decVarBeginTag()

ilQTIParser::decVarBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

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

◆ displayFeedbackBeginTag()

ilQTIParser::displayFeedbackBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

1393  : void
1394  {
1395  $this->displayfeedback = new ilQTIDisplayfeedback();
1396  foreach ($a_attribs as $attribute => $value) {
1397  switch (strtolower($attribute)) {
1398  case "feedbacktype":
1399  $this->displayfeedback->setFeedbacktype($value);
1400  break;
1401  case "linkrefid":
1402  $this->displayfeedback->setLinkrefid($value);
1403  break;
1404  }
1405  }
1406  }
+ Here is the caller graph for this function:

◆ fetchNumericVersionFromVersionDateString()

ilQTIParser::fetchNumericVersionFromVersionDateString ( string  $versionDateString)
protected

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

References null.

Referenced by handlerParseEndTag().

1262  : ?string
1263  {
1264  $matches = null;
1265 
1266  if (preg_match('/^(\d+\.\d+\.\d+)$/', $versionDateString, $matches)) {
1267  return $matches[1];
1268  }
1269 
1270  return null;
1271  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ fetchSourceNicFromItemIdent()

ilQTIParser::fetchSourceNicFromItemIdent ( string  $itemIdent)
protected

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

References null.

Referenced by itemBeginTag().

1273  : ?string
1274  {
1275  $matches = null;
1276 
1277  if (preg_match('/^il_(\d+?)_qst_\d+$/', $itemIdent, $matches)) {
1278  return $matches[1];
1279  }
1280 
1281  return null;
1282  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getFoundItems()

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

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

References $founditems.

1212  : array
1213  {
1214  return $this->founditems;
1215  }

◆ getImportMapping()

ilQTIParser::getImportMapping ( )

Get array of new created questions for import id.

Returns
array<string, {test: mixed}>

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

References $import_mapping.

Referenced by getQuestionIdMapping().

1221  : array
1222  {
1223  return $this->import_mapping;
1224  }
+ Here is the caller graph for this function:

◆ getNumImportedItems()

ilQTIParser::getNumImportedItems ( )

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

References $numImportedItems.

1315  : int
1316  {
1317  return $this->numImportedItems;
1318  }

◆ getParent()

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

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

Referenced by handlerParseCharacterData(), and handlerParseEndTag().

272  : string
273  {
274  if ($this->depth[$a_xml_parser] > 0) {
275  return $this->path[$this->depth[$a_xml_parser] - 1];
276  }
277 
278  return "";
279  }
+ Here is the caller graph for this function:

◆ getQuestionIdMapping()

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

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

References getImportMapping().

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

◆ getQuestionSetType()

ilQTIParser::getQuestionSetType ( )

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

References $questionSetType.

229  : ?string
230  {
231  return $this->questionSetType;
232  }

◆ getTestObject()

ilQTIParser::getTestObject ( )

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

References $tst_object.

245  : ilObjTest
246  {
247  return $this->tst_object;
248  }
ilObjTest $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 285 of file class.ilQTIParser.php.

References handlerParseBeginTag(), and handlerVerifyBeginTag().

Referenced by setHandlers().

285  : void
286  {
287  switch ($this->parser_mode) {
288  case self::IL_MO_PARSE_QTI:
289  $this->handlerParseBeginTag($a_xml_parser, $a_name, $a_attribs);
290  break;
291  case self::IL_MO_VERIFY_QTI:
292  $this->handlerVerifyBeginTag($a_xml_parser, $a_name, $a_attribs);
293  break;
294  }
295  }
handlerParseBeginTag($a_xml_parser, string $a_name, array $a_attribs)
handlerVerifyBeginTag($a_xml_parser, string $a_name, array $a_attribs)
+ 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 898 of file class.ilQTIParser.php.

References handlerParseCharacterData(), and handlerVerifyCharacterData().

Referenced by setHandlers().

898  : void
899  {
900  switch ($this->parser_mode) {
901  case self::IL_MO_PARSE_QTI:
902  $this->handlerParseCharacterData($a_xml_parser, $a_data);
903  break;
904  case self::IL_MO_VERIFY_QTI:
905  $this->handlerVerifyCharacterData($a_xml_parser, $a_data);
906  break;
907  }
908  }
handlerVerifyCharacterData($a_xml_parser, string $a_data)
handlerParseCharacterData($a_xml_parser, string $a_data)
+ 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 557 of file class.ilQTIParser.php.

References handlerParseEndTag(), and handlerVerifyEndTag().

Referenced by setHandlers().

557  : void
558  {
559  switch ($this->parser_mode) {
560  case self::IL_MO_PARSE_QTI:
561  $this->handlerParseEndTag($a_xml_parser, $a_name);
562  break;
563  case self::IL_MO_VERIFY_QTI:
564  $this->handlerVerifyEndTag($a_xml_parser, $a_name);
565  break;
566  }
567  }
handlerParseEndTag($a_xml_parser, string $a_name)
NotOptimalIfConditionsInspection
handlerVerifyEndTag($a_xml_parser, string $a_name)
+ 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 301 of file class.ilQTIParser.php.

References assessmentBeginTag(), assessmentControlBeginTag(), decVarBeginTag(), displayFeedbackBeginTag(), assQuestionExport\ITEM_SOLUTIONHINT, itemBeginTag(), itemFeedbackBeginTag(), matAppletBeginTag(), materialBeginTag(), matImageBeginTag(), matTextBeginTag(), null, 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().

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

References $characterbuffer, getParent(), and null.

Referenced by handlerCharacterData().

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

NotOptimalIfConditionsInspection

Parameters
XMLParser | resource$a_xml_parser

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

References $characterbuffer, Vendor\Package\$e, $GLOBALS, $solutionhint, fetchNumericVersionFromVersionDateString(), ILIAS\Test\Questions\Presentation\getLabel, getParent(), ilAssQuestionTypeList\isImportable(), isMatImageAvailable(), assQuestionExport\ITEM_SOLUTIONHINT, null, and virusDetected().

Referenced by handlerEndTag().

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

References assQuestionExport\ITEM_SOLUTIONHINT, 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().

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

Referenced by handlerCharacterData().

1185  : void
1186  {
1187  if ($this->verifyqticomment == 1) {
1188  if (preg_match("/Questiontype\=(.*)/", $a_data, $matches)) {
1189  if (count($this->founditems)) {
1190  $this->founditems[count($this->founditems) - 1]["type"] = $matches[1];
1191  }
1192  }
1193  } elseif ($this->verifyfieldlabel == 1) {
1194  $this->verifyfieldlabeltext = $a_data;
1195  } elseif ($this->verifyfieldentry == 1) {
1196  $this->verifyfieldentrytext = $a_data;
1197  }
1198 
1199  switch ($this->qti_element) {
1200  case "fieldlabel":
1201  $this->metadata["label"] = $a_data;
1202  break;
1203  case "fieldentry":
1204  $this->metadata["entry"] = $a_data;
1205  break;
1206  }
1207  }
+ 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 1138 of file class.ilQTIParser.php.

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

Referenced by handlerEndTag().

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

◆ isIgnoreItemsEnabled()

ilQTIParser::isIgnoreItemsEnabled ( )

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

References $ignoreItemsEnabled.

Referenced by itemBeginTag().

219  : bool
220  {
222  }
+ Here is the caller graph for this function:

◆ isMatImageAvailable()

ilQTIParser::isMatImageAvailable ( )
protected

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

Referenced by handlerParseEndTag().

1320  : bool
1321  {
1322  if (!$this->material) {
1323  return false;
1324  }
1325 
1326  if (!$this->matimage) {
1327  return false;
1328  }
1329 
1330  return true;
1331  }
+ Here is the caller graph for this function:

◆ itemBeginTag()

ilQTIParser::itemBeginTag ( array  $a_attribs)
private

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

References fetchSourceNicFromItemIdent(), and isIgnoreItemsEnabled().

Referenced by handlerParseBeginTag().

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

Referenced by handlerParseBeginTag().

1378  : void
1379  {
1380  $this->itemfeedback = new ilQTIItemfeedback();
1381  foreach ($a_attribs as $attribute => $value) {
1382  switch (strtolower($attribute)) {
1383  case "ident":
1384  $this->itemfeedback->setIdent($value);
1385  break;
1386  case "view":
1387  $this->itemfeedback->setView($value);
1388  break;
1389  }
1390  }
1391  }
+ Here is the caller graph for this function:

◆ matAppletBeginTag()

ilQTIParser::matAppletBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

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

◆ materialBeginTag()

ilQTIParser::materialBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

1711  : void
1712  {
1713  $this->material = new ilQTIMaterial();
1714  $this->material->setFlow($this->flow);
1715  foreach ($a_attribs as $attribute => $value) {
1716  switch (strtolower($attribute)) {
1717  case "label":
1718  $this->material->setLabel($value);
1719  break;
1720  }
1721  }
1722  }
+ Here is the caller graph for this function:

◆ matImageBeginTag()

ilQTIParser::matImageBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

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

◆ matTextBeginTag()

ilQTIParser::matTextBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

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

◆ openXMLFile()

ilQTIParser::openXMLFile ( )
protected

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

References cleanInvalidXmlChars().

1254  {
1255  $xmlContent = file_get_contents($this->xml_file);
1256  $xmlContent = $this->cleanInvalidXmlChars($xmlContent);
1257  file_put_contents($this->xml_file, $xmlContent);
1258 
1259  return parent::openXMLFile();
1260  }
cleanInvalidXmlChars(string $xmlContent)
+ Here is the call graph for this function:

◆ renderChoiceBeginTag()

ilQTIParser::renderChoiceBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

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

◆ renderFibBeginTag()

ilQTIParser::renderFibBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

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

◆ renderHotspotBeginTag()

ilQTIParser::renderHotspotBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

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

◆ responseLabelBeginTag()

ilQTIParser::responseLabelBeginTag ( array  $a_attribs)
private

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

References null.

Referenced by handlerParseBeginTag().

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

◆ resprocessingBeginTag()

ilQTIParser::resprocessingBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

1510  : void
1511  {
1512  $this->resprocessing = new ilQTIResprocessing();
1513  foreach ($a_attribs as $attribute => $value) {
1514  switch (strtolower($attribute)) {
1515  case "scoremodel":
1516  $this->resprocessing->setScoremodel($value);
1517  break;
1518  }
1519  }
1520  }
+ Here is the caller graph for this function:

◆ setHandlers()

ilQTIParser::setHandlers (   $a_xml_parser)

set event handler should be overwritten by inherited class private

Parameters
XMLParser | resource$a_xml_parser

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

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

257  : void
258  {
259  xml_set_element_handler($a_xml_parser, $this->handlerBeginTag(...), $this->handlerEndTag(...));
260  xml_set_character_data_handler($a_xml_parser, $this->handlerCharacterData(...));
261  }
handlerBeginTag($a_xml_parser, string $a_name, array $a_attribs)
handlerCharacterData($a_xml_parser, string $a_data)
handlerEndTag($a_xml_parser, string $a_name)
+ Here is the call graph for this function:

◆ setIgnoreItemsEnabled()

ilQTIParser::setIgnoreItemsEnabled ( bool  $ignoreItemsEnabled)

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

References $ignoreItemsEnabled.

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

◆ setQuestionSetType()

ilQTIParser::setQuestionSetType ( string  $questionSetType)
protected

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

References $questionSetType.

Referenced by handlerVerifyEndTag().

234  : void
235  {
236  $this->questionSetType = $questionSetType;
237  }
+ Here is the caller graph for this function:

◆ setTestObject()

ilQTIParser::setTestObject ( ilObjTest  $tst_object)

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

References $tst_object, and ilObject\getId().

Referenced by ilTestImporter\importXmlRepresentation().

239  : void
240  {
241  $this->tst_object = $tst_object;
242  $this->tst_id = $this->tst_object->getId();
243  }
ilObjTest $tst_object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setVarBeginTag()

ilQTIParser::setVarBeginTag ( array  $a_attribs)
private

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

Referenced by handlerParseBeginTag().

1408  : void
1409  {
1410  $this->setvar = new ilQTISetvar();
1411  foreach ($a_attribs as $attribute => $value) {
1412  switch (strtolower($attribute)) {
1413  case "action":
1414  $this->setvar->setAction($value);
1415  break;
1416  case "varname":
1417  $this->setvar->setVarname($value);
1418  break;
1419  }
1420  }
1421  }
+ Here is the caller graph for this function:

◆ setXMLContent()

ilQTIParser::setXMLContent ( string  $a_xml_content)

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

References cleanInvalidXmlChars().

1243  : void
1244  {
1245  $a_xml_content = $this->cleanInvalidXmlChars($a_xml_content);
1246 
1247  parent::setXMLContent($a_xml_content);
1248  }
cleanInvalidXmlChars(string $xmlContent)
+ Here is the call graph for this function:

◆ startParsing()

ilQTIParser::startParsing ( )

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

Referenced by ilObjQuestionPoolGUI\importQuestionsFromQtiFile(), and ilTestQuestionPoolImporter\importXmlRepresentation().

263  : void
264  {
265  $this->question_counter = 1;
266  parent::startParsing();
267  }
+ Here is the caller graph for this function:

◆ termsAndDefinitionsBeginTag()

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

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

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().

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

◆ varEqualBeginTag()

ilQTIParser::varEqualBeginTag ( array  $a_attribs)
private

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

References ilQTIResponseVar\RESPONSEVAR_EQUAL.

Referenced by handlerParseBeginTag().

1423  : void
1424  {
1425  $this->responsevar = new ilQTIResponseVar(ilQTIResponseVar::RESPONSEVAR_EQUAL);
1426  foreach ($a_attribs as $attribute => $value) {
1427  switch (strtolower($attribute)) {
1428  case "case":
1429  $this->responsevar->setCase($value);
1430  break;
1431  case "respident":
1432  $this->responsevar->setRespident($value);
1433  break;
1434  case "index":
1435  $this->responsevar->setIndex($value);
1436  break;
1437  }
1438  }
1439  }
+ Here is the caller graph for this function:

◆ virusDetected()

ilQTIParser::virusDetected ( string  $buffer)
protected

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

References ilVirusScannerFactory\_getInstance(), and null.

Referenced by handlerParseEndTag().

1333  : bool
1334  {
1336 
1337  if ($vs === null) {
1338  return false; // no virus scan, no virus detected
1339  }
1340 
1341  return $vs->scanBuffer($buffer);
1342  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ 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 133 of file class.ilQTIParser.php.

◆ $assessmentcontrol

ilQTIAssessmentcontrol ilQTIParser::$assessmentcontrol = null

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

◆ $assessments

array ilQTIParser::$assessments = []

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

◆ $characterbuffer

string ilQTIParser::$characterbuffer = ""

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

Referenced by handlerParseCharacterData(), and handlerParseEndTag().

◆ $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 124 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.

◆ $founditems

array ilQTIParser::$founditems = []

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

Referenced by getFoundItems().

◆ $gap_index

int ilQTIParser::$gap_index = 0

Definition at line 126 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 179 of file class.ilQTIParser.php.

Referenced by isIgnoreItemsEnabled(), and setIgnoreItemsEnabled().

◆ $import_idents

array ilQTIParser::$import_idents = []

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

◆ $import_mapping

array ilQTIParser::$import_mapping = []

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

Referenced by getImportMapping().

◆ $in_assessment

bool ilQTIParser::$in_assessment = false

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

◆ $in_itemmetadata

bool ilQTIParser::$in_itemmetadata = false

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

◆ $in_objectives

bool ilQTIParser::$in_objectives = false

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

◆ $in_prensentation_material

bool ilQTIParser::$in_prensentation_material = false
protected

Definition at line 177 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 181 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" => ""
private

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

◆ $numImportedItems

int ilQTIParser::$numImportedItems = 0
protected

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

Referenced by getNumImportedItems().

◆ $objectives

ilQTIObjectives ilQTIParser::$objectives = null

Definition at line 137 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 175 of file class.ilQTIParser.php.

◆ $presentation

ilQTIPresentation ilQTIParser::$presentation = null

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

◆ $qpl_id

int ilQTIParser::$qpl_id = 0

Definition at line 118 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 148 of file class.ilQTIParser.php.

◆ $questionfiles

QuestionFiles ilQTIParser::$questionfiles
protected

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

◆ $questionSetType

string ilQTIParser::$questionSetType = null
protected

Definition at line 190 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 188 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 141 of file class.ilQTIParser.php.

◆ $setvar

ilQTISetvar ilQTIParser::$setvar = null

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

◆ $solutionhint

ilQTIParser::$solutionhint = null
protected

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

Referenced by handlerParseEndTag().

◆ $solutionhints

ilQTIParser::$solutionhints = []

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

◆ $tst_id

int ilQTIParser::$tst_id = null

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

◆ $tst_object

ilObjTest ilQTIParser::$tst_object = null

Definition at line 122 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 169 of file class.ilQTIParser.php.

◆ $verifyfieldentrytext

string ilQTIParser::$verifyfieldentrytext = ""

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

Referenced by handlerVerifyEndTag().

◆ $verifyfieldlabel

int ilQTIParser::$verifyfieldlabel = 0

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

◆ $verifyfieldlabeltext

string ilQTIParser::$verifyfieldlabeltext = ""

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

◆ $verifymetadatafield

int ilQTIParser::$verifymetadatafield = 0

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

◆ $verifyqticomment

int ilQTIParser::$verifyqticomment = 0

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

◆ $verifyroot

bool ilQTIParser::$verifyroot = false

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

◆ entry

array ilQTIParser::entry => ""]

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

◆ IL_MO_PARSE_QTI

◆ IL_MO_VERIFY_QTI


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