ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilAsqService Class Reference
+ Collaboration diagram for ilAsqService:

Public Member Functions

 fetchNextAuthoringCommandClass ($nextClass)
 
 determineQuestionTypeByQtiItem (ilQTIItem $qtiItem)
 
 questionTitleExists ($parentObjectId, $questionTitle)
 

Detailed Description

Definition at line 12 of file class.ilAsqService.php.

Member Function Documentation

◆ determineQuestionTypeByQtiItem()

ilAsqService::determineQuestionTypeByQtiItem ( ilQTIItem  $qtiItem)
Parameters
ilQTIItem$qtiItem
Returns
string

Definition at line 43 of file class.ilAsqService.php.

References ilQTIItem\getQuestiontype().

43  : string
44  {
45  // the qti service parses ILIAS question types, so use it
46  // although this may get changed in the future
47  return $qtiItem->getQuestiontype();
48  }
+ Here is the call graph for this function:

◆ fetchNextAuthoringCommandClass()

ilAsqService::fetchNextAuthoringCommandClass (   $nextClass)
Parameters
ilCtrl$ctrl
Returns
string

Definition at line 18 of file class.ilAsqService.php.

References $DIC.

18  : string
19  {
20  global $DIC; /* @var ILIAS\DI\Container $DIC */
21 
22  $row = $DIC->database()->fetchAssoc($DIC->database()->queryF(
23  "SELECT COUNT(question_type_id) cnt FROM qpl_qst_type WHERE ctrl_class = %s",
24  array('text'),
25  array($nextClass)
26  ));
27 
28  if ($row['cnt']) {
29  // current next class is indeed an authoring ctrl class,
30  // return it to have the switch(nextclass) case matching
31  return $nextClass;
32  }
33 
34  // the interface that NOT represents a valid ctrl class,
35  // this will lead to a non matching switch(nextclass) case
36  return 'ilasqquestionauthoring';
37  }
$DIC
Definition: xapitoken.php:46

◆ questionTitleExists()

ilAsqService::questionTitleExists (   $parentObjectId,
  $questionTitle 
)
Parameters
integer$parentObjectId
string$questionTitle
Returns
bool

Definition at line 55 of file class.ilAsqService.php.

References $DIC.

55  : bool
56  {
57  global $DIC; /* @var ILIAS\DI\Container $DIC */
58 
59  $row = $DIC->database()->fetchAssoc($DIC->database()->queryF(
60  "SELECT COUNT(question_id) cnt FROM qpl_questions WHERE obj_fi = %s AND title = %s",
61  array('integer', 'text'),
62  array($parentObjectId, $questionTitle)
63  ));
64 
65  return $row['cnt'] > 0;
66  }
$DIC
Definition: xapitoken.php:46

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