ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilTestSkillLevelThresholdImportFails Class Reference
+ Collaboration diagram for ilTestSkillLevelThresholdImportFails:

Public Member Functions

 __construct ($parentObjId)
 ilTestSkillLevelThresholdImportFails constructor. More...
 
 getFailedImports ()
 
 registerFailedImports (ilAssQuestionAssignedSkillList $skillList)
 
 deleteRegisteredImportFails ()
 
 failedImportsRegistered ()
 
 getFailedImportsMessage (ilLanguage $lng)
 

Protected Member Functions

 getSettings ()
 
 getParentObjId ()
 
 buildSettingsKey ()
 

Protected Attributes

 $settings
 
 $parentObjId
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilTestSkillLevelThresholdImportFails::__construct (   $parentObjId)

ilTestSkillLevelThresholdImportFails constructor.

Parameters
$parentObjId

Definition at line 43 of file class.ilTestSkillLevelThresholdImportFails.php.

References $parentObjId.

Member Function Documentation

◆ buildSettingsKey()

ilTestSkillLevelThresholdImportFails::buildSettingsKey ( )
protected
Returns
string

Definition at line 71 of file class.ilTestSkillLevelThresholdImportFails.php.

71 : string
72 {
73 return 'failed_imp_slt_parentobj_' . $this->getParentObjId();
74 }

References getParentObjId().

Referenced by deleteRegisteredImportFails(), getFailedImports(), and registerFailedImports().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteRegisteredImportFails()

ilTestSkillLevelThresholdImportFails::deleteRegisteredImportFails ( )

◆ failedImportsRegistered()

ilTestSkillLevelThresholdImportFails::failedImportsRegistered ( )
Returns
bool

Definition at line 108 of file class.ilTestSkillLevelThresholdImportFails.php.

108 : bool
109 {
110 return $this->getFailedImports() !== null;
111 }

References getFailedImports().

+ Here is the call graph for this function:

◆ getFailedImports()

ilTestSkillLevelThresholdImportFails::getFailedImports ( )
Returns
ilAssQuestionAssignedSkillList|null

Definition at line 79 of file class.ilTestSkillLevelThresholdImportFails.php.

80 {
81 $value = $this->getSettings()->get($this->buildSettingsKey(), null);
82
83 if ($value !== null) {
84 return unserialize($value);
85 }
86
87 return null;
88 }

References buildSettingsKey(), and getSettings().

Referenced by failedImportsRegistered(), and getFailedImportsMessage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFailedImportsMessage()

ilTestSkillLevelThresholdImportFails::getFailedImportsMessage ( ilLanguage  $lng)
Parameters
ilLanguage$lng
Returns
string

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

117 : string
118 {
119 $msg = $lng->txt('tst_failed_imp_skl_thresholds');
120
121 $msg .= '<ul>';
122 foreach ($this->getFailedImports() as $skill_key) {
123 [$skill_base_id, $skill_tref_id] = explode(':', $skill_key);
124 $skill_title = ilBasicSkill::_lookupTitle((int) $skill_base_id, (int) $skill_tref_id);
125
126 $msg .= '<li>' . $skill_title . '</li>';
127 }
128 $msg .= '</ul>';
129
130 return $msg;
131 }
static _lookupTitle(int $a_obj_id, int $a_tref_id=0)
global $lng
Definition: privfeed.php:31

References $lng, ilSkillTreeNode\_lookupTitle(), and getFailedImports().

+ Here is the call graph for this function:

◆ getParentObjId()

ilTestSkillLevelThresholdImportFails::getParentObjId ( )
protected
Returns
int

Definition at line 63 of file class.ilTestSkillLevelThresholdImportFails.php.

63 : int
64 {
65 return $this->parentObjId;
66 }

References $parentObjId.

Referenced by buildSettingsKey().

+ Here is the caller graph for this function:

◆ getSettings()

ilTestSkillLevelThresholdImportFails::getSettings ( )
protected
Returns
ilSetting

Definition at line 51 of file class.ilTestSkillLevelThresholdImportFails.php.

51 : ilSetting
52 {
53 if ($this->settings === null) {
54 $this->settings = new ilSetting('assimportfails');
55 }
56
57 return $this->settings;
58 }
ILIAS Setting Class.

References $settings, and ILIAS\Repository\settings().

Referenced by deleteRegisteredImportFails(), getFailedImports(), and registerFailedImports().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerFailedImports()

ilTestSkillLevelThresholdImportFails::registerFailedImports ( ilAssQuestionAssignedSkillList  $skillList)
Parameters
ilAssQuestionAssignedSkillList$skillList

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

94 {
95 $this->getSettings()->set($this->buildSettingsKey(), serialize($skillList));
96 }

References buildSettingsKey(), and getSettings().

+ Here is the call graph for this function:

Field Documentation

◆ $parentObjId

ilTestSkillLevelThresholdImportFails::$parentObjId
protected

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

Referenced by __construct(), and getParentObjId().

◆ $settings

ilTestSkillLevelThresholdImportFails::$settings
protected

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

Referenced by getSettings().


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