ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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

 $pluginAdmin
 
 $id
 
 $tag
 
 $plugin
 
 $pluginName
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilAssQuestionType::__construct ( )

ilAssQuestionType constructor.

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

41 {
42 $this->pluginAdmin = isset($GLOBALS['DIC']) ? $GLOBALS['DIC']['ilPluginAdmin'] : $GLOBALS['ilPluginAdmin'];
43 }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $GLOBALS.

Member Function Documentation

◆ completeMissingPluginName()

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

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

132 {
133 if ($questionTypeData['plugin'] && !strlen($questionTypeData['plugin_name'])) {
134 $questionTypeData['plugin_name'] = $questionTypeData['type_tag'];
135 }
136
137 return $questionTypeData;
138 }

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

+ Here is the caller graph for this function:

◆ getId()

ilAssQuestionType::getId ( )
Returns
int

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

References $id.

◆ getPluginName()

ilAssQuestionType::getPluginName ( )
Returns
string

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

References $pluginName.

Referenced by isImportable().

+ Here is the caller graph for this function:

◆ getTag()

ilAssQuestionType::getTag ( )
Returns
string

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

References $tag.

◆ isImportable()

ilAssQuestionType::isImportable ( )
Returns
bool

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

113 {
114 if (!$this->isPlugin()) {
115 return true;
116 }
117
118 require_once 'Modules/TestQuestionPool/classes/class.ilQuestionsPlugin.php';
119 return $this->pluginAdmin->isActive(
123 $this->getPluginName()
124 );
125 }
const IL_COMP_MODULE

References ilQuestionsPlugin\COMP_NAME, getPluginName(), IL_COMP_MODULE, isPlugin(), and ilQuestionsPlugin\SLOT_ID.

+ Here is the call graph for this function:

◆ isPlugin()

ilAssQuestionType::isPlugin ( )
Returns
bool

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

References $plugin.

Referenced by isImportable().

+ Here is the caller graph for this function:

◆ setId()

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

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

57 {
58 $this->id = $id;
59 }

References $id.

◆ setPlugin()

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

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

89 {
90 $this->plugin = $plugin;
91 }

References $plugin.

◆ setPluginName()

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

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

105 {
106 $this->pluginName = $pluginName;
107 }

References $pluginName.

◆ setTag()

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

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

73 {
74 $this->tag = $tag;
75 }

References $tag.

Field Documentation

◆ $id

ilAssQuestionType::$id
protected

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

Referenced by getId(), and setId().

◆ $plugin

ilAssQuestionType::$plugin
protected

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

Referenced by isPlugin(), and setPlugin().

◆ $pluginAdmin

ilAssQuestionType::$pluginAdmin
protected

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

◆ $pluginName

ilAssQuestionType::$pluginName
protected

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

Referenced by getPluginName(), and setPluginName().

◆ $tag

ilAssQuestionType::$tag
protected

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

Referenced by getTag(), and setTag().


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