ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 $GLOBALS.

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

Member Function Documentation

◆ completeMissingPluginName()

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

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

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

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

◆ getId()

ilAssQuestionType::getId ( )
Returns
int

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

References $id.

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

◆ getPluginName()

ilAssQuestionType::getPluginName ( )
Returns
string

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

References $pluginName.

Referenced by isImportable().

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

◆ getTag()

ilAssQuestionType::getTag ( )
Returns
string

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

References $tag.

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

◆ isImportable()

ilAssQuestionType::isImportable ( )
Returns
bool

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

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

113  {
114  if( !$this->isPlugin() )
115  {
116  return true;
117  }
118 
119  require_once 'Modules/TestQuestionPool/classes/class.ilQuestionsPlugin.php';
120  return $this->pluginAdmin->isActive(
122  );
123  }
const IL_COMP_MODULE
+ 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().

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

◆ setId()

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

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

References $id.

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

◆ setPlugin()

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

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

References $plugin.

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

◆ setPluginName()

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

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

References $pluginName.

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

◆ setTag()

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

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

References $tag.

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

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: