ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAssQuestionType Class Reference
+ Collaboration diagram for ilAssQuestionType:

Public Member Functions

 __construct ()
 ilAssQuestionType constructor. More...
 
 getId ()
 
 setId ($id)
 
 getTag ()
 
 setTag ($tag)
 
 isPlugin ()
 
 setPlugin ($plugin)
 
 getPluginName ()
 
 setPluginName ($pluginName)
 
 isImportable ()
 

Static Public Member Functions

static completeMissingPluginName ($questionTypeData)
 

Protected Attributes

ilComponentRepository $component_repository
 
 $id
 
 $tag
 
 $plugin
 
 $pluginName
 

Detailed Description

Definition at line 25 of file class.ilAssQuestionType.php.

Constructor & Destructor Documentation

◆ __construct()

ilAssQuestionType::__construct ( )

ilAssQuestionType constructor.

Definition at line 52 of file class.ilAssQuestionType.php.

References $DIC.

53  {
54  global $DIC; /* @var ILIAS\DI\Container $DIC */
55  $this->component_repository = $DIC['component.repository'];
56  }
global $DIC
Definition: feed.php:28

Member Function Documentation

◆ completeMissingPluginName()

static ilAssQuestionType::completeMissingPluginName (   $questionTypeData)
static
Parameters
array$questionTypeData
Returns
array

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

Referenced by ilObjTest\getAvailableQuestions(), ilAssQuestionTypeList\load(), ilAssQuestionList\load(), and ilTestRandomQuestionSetStagingPoolQuestionList\loadQuestions().

156  : array
157  {
158  if ($questionTypeData['plugin'] && !strlen($questionTypeData['plugin_name'])) {
159  $questionTypeData['plugin_name'] = $questionTypeData['type_tag'];
160  }
161 
162  return $questionTypeData;
163  }
+ Here is the caller graph for this function:

◆ getId()

ilAssQuestionType::getId ( )
Returns
int

Definition at line 61 of file class.ilAssQuestionType.php.

References $id.

61  : int
62  {
63  return $this->id;
64  }

◆ getPluginName()

ilAssQuestionType::getPluginName ( )
Returns
string

Definition at line 109 of file class.ilAssQuestionType.php.

References $pluginName.

Referenced by isImportable().

109  : string
110  {
111  return $this->pluginName;
112  }
+ Here is the caller graph for this function:

◆ getTag()

ilAssQuestionType::getTag ( )
Returns
string

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

References $tag.

77  : string
78  {
79  return $this->tag;
80  }

◆ isImportable()

ilAssQuestionType::isImportable ( )
Returns
bool

Definition at line 125 of file class.ilAssQuestionType.php.

References getPluginName(), isPlugin(), and ilComponentInfo\TYPE_MODULES.

125  : bool
126  {
127  if (!$this->isPlugin()) {
128  return true;
129  }
130 
131  // Plugins MAY overwrite this method an report back their activation status
132  if (!$this->component_repository->getComponentByTypeAndName(
134  'TestQuestionPool'
135  )->getPluginSlotById('qst')->hasPluginName($this->getPluginName())) {
136  return false;
137  }
138 
139  return $this->component_repository
140  ->getComponentByTypeAndName(
142  'TestQuestionPool'
143  )
144  ->getPluginSlotById(
145  'qst'
146  )
147  ->getPluginByName(
148  $this->getPluginName()
149  )->isActive();
150  }
+ Here is the call graph for this function:

◆ isPlugin()

ilAssQuestionType::isPlugin ( )
Returns
bool

Definition at line 93 of file class.ilAssQuestionType.php.

References $plugin.

Referenced by isImportable().

93  : bool
94  {
95  return $this->plugin;
96  }
+ Here is the caller graph for this function:

◆ setId()

ilAssQuestionType::setId (   $id)
Parameters
int$id

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

References $id.

69  : void
70  {
71  $this->id = $id;
72  }

◆ setPlugin()

ilAssQuestionType::setPlugin (   $plugin)
Parameters
bool$plugin

Definition at line 101 of file class.ilAssQuestionType.php.

References $plugin.

101  : void
102  {
103  $this->plugin = $plugin;
104  }

◆ setPluginName()

ilAssQuestionType::setPluginName (   $pluginName)
Parameters
string$pluginName

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

References $pluginName.

117  : void
118  {
119  $this->pluginName = $pluginName;
120  }

◆ setTag()

ilAssQuestionType::setTag (   $tag)
Parameters
string$tag

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

References $tag.

85  : void
86  {
87  $this->tag = $tag;
88  }

Field Documentation

◆ $component_repository

ilComponentRepository ilAssQuestionType::$component_repository
protected

Definition at line 27 of file class.ilAssQuestionType.php.

◆ $id

ilAssQuestionType::$id
protected

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

Referenced by getId(), and setId().

◆ $plugin

ilAssQuestionType::$plugin
protected

Definition at line 42 of file class.ilAssQuestionType.php.

Referenced by isPlugin(), and setPlugin().

◆ $pluginName

ilAssQuestionType::$pluginName
protected

Definition at line 47 of file class.ilAssQuestionType.php.

Referenced by getPluginName(), and setPluginName().

◆ $tag

ilAssQuestionType::$tag
protected

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

Referenced by getTag(), and setTag().


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