ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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.

References $DIC.

41  {
42  global $DIC; /* @var ILIAS\DI\Container $DIC */
43  $this->pluginAdmin = $DIC['ilPluginAdmin'];
44  }
global $DIC
Definition: saml.php:7

Member Function Documentation

◆ completeMissingPluginName()

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

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

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

133  {
134  if ($questionTypeData['plugin'] && !strlen($questionTypeData['plugin_name'])) {
135  $questionTypeData['plugin_name'] = $questionTypeData['type_tag'];
136  }
137 
138  return $questionTypeData;
139  }
+ Here is the caller graph for this function:

◆ getId()

ilAssQuestionType::getId ( )
Returns
int

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

References $id.

50  {
51  return $this->id;
52  }

◆ getPluginName()

ilAssQuestionType::getPluginName ( )
Returns
string

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

References $pluginName.

Referenced by isImportable().

98  {
99  return $this->pluginName;
100  }
+ Here is the caller graph for this function:

◆ getTag()

ilAssQuestionType::getTag ( )
Returns
string

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

References $tag.

66  {
67  return $this->tag;
68  }

◆ isImportable()

ilAssQuestionType::isImportable ( )
Returns
bool

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

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

114  {
115  if (!$this->isPlugin()) {
116  return true;
117  }
118 
119  require_once 'Modules/TestQuestionPool/classes/class.ilQuestionsPlugin.php';
120  return $this->pluginAdmin->isActive(
124  $this->getPluginName()
125  );
126  }
const IL_COMP_MODULE
+ Here is the call graph for this function:

◆ isPlugin()

ilAssQuestionType::isPlugin ( )
Returns
bool

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

References $plugin.

Referenced by isImportable().

82  {
83  return $this->plugin;
84  }
+ Here is the caller graph for this function:

◆ setId()

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

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

References $id.

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

◆ setPlugin()

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

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

References $plugin.

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

◆ setPluginName()

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

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

References $pluginName.

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

◆ setTag()

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

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

References $tag.

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

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: