ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilAssQuestionType Class Reference
+ Collaboration diagram for ilAssQuestionType:

Public Member Functions

 __construct ()
 
 getId ()
 
 setId (int $id)
 
 getTag ()
 
 setTag (string $tag)
 
 setPlugin (bool $is_plugin)
 
 setPluginName (?string $plugin_name)
 
 isImportable ()
 

Static Public Member Functions

static completeMissingPluginName (array $question_type_data)
 

Protected Attributes

ilComponentRepository $component_repository
 
int $id
 
string $tag = ''
 
bool $is_plugin
 
string $plugin_name = null
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilAssQuestionType::__construct ( )

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

References $DIC.

35  {
36  global $DIC;
37  $this->component_repository = $DIC['component.repository'];
38  }
global $DIC
Definition: shib_login.php:22

Member Function Documentation

◆ completeMissingPluginName()

static ilAssQuestionType::completeMissingPluginName ( array  $question_type_data)
static

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

References null.

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

104  : array
105  {
106  if ($question_type_data['plugin']
107  && $question_type_data['plugin_name'] !== null
108  && $question_type_data['plugin_name'] !== '') {
109  $question_type_data['plugin_name'] = $question_type_data['type_tag'];
110  }
111 
112  return $question_type_data;
113  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getId()

ilAssQuestionType::getId ( )

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

References $id.

40  : int
41  {
42  return $this->id;
43  }

◆ getTag()

ilAssQuestionType::getTag ( )

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

References $tag.

50  : string
51  {
52  return $this->tag;
53  }

◆ isImportable()

ilAssQuestionType::isImportable ( )
Returns
bool

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

References ilComponentInfo\TYPE_MODULES.

73  : bool
74  {
75  if (!$this->is_plugin) {
76  return true;
77  }
78 
79  if (!isset($this->plugin_name)) {
80  return false;
81  }
82 
83  // Plugins MAY overwrite this method an report back their activation status
84  if (!$this->component_repository->getComponentByTypeAndName(
86  'TestQuestionPool'
87  )->getPluginSlotById('qst')->hasPluginName($this->plugin_name)) {
88  return false;
89  }
90 
91  return $this->component_repository
92  ->getComponentByTypeAndName(
94  'TestQuestionPool'
95  )
96  ->getPluginSlotById(
97  'qst'
98  )
99  ->getPluginByName(
100  $this->plugin_name
101  )->isActive();
102  }

◆ setId()

ilAssQuestionType::setId ( int  $id)

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

References $id.

45  : void
46  {
47  $this->id = $id;
48  }

◆ setPlugin()

ilAssQuestionType::setPlugin ( bool  $is_plugin)

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

References $is_plugin.

60  : void
61  {
62  $this->is_plugin = $is_plugin;
63  }

◆ setPluginName()

ilAssQuestionType::setPluginName ( ?string  $plugin_name)

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

References $plugin_name.

65  : void
66  {
67  $this->plugin_name = $plugin_name;
68  }

◆ setTag()

ilAssQuestionType::setTag ( string  $tag)

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

References $tag.

55  : void
56  {
57  $this->tag = $tag;
58  }

Field Documentation

◆ $component_repository

ilComponentRepository ilAssQuestionType::$component_repository
protected

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

◆ $id

int ilAssQuestionType::$id
protected

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

Referenced by getId(), and setId().

◆ $is_plugin

bool ilAssQuestionType::$is_plugin
protected

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

Referenced by setPlugin().

◆ $plugin_name

string ilAssQuestionType::$plugin_name = null
protected

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

Referenced by setPluginName().

◆ $tag

string ilAssQuestionType::$tag = ''
protected

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

Referenced by getTag(), and setTag().


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