ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
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

Deprecated:
12: Use ILIAS\Test\ExportImport\Import\SkillLevelThresholdImporter instead

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

Constructor & Destructor Documentation

◆ __construct()

ilTestSkillLevelThresholdImportFails::__construct (   $parentObjId)

ilTestSkillLevelThresholdImportFails constructor.

Parameters
$parentObjId

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

References $parentObjId.

Member Function Documentation

◆ buildSettingsKey()

ilTestSkillLevelThresholdImportFails::buildSettingsKey ( )
protected
Returns
string

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

68 : string
69 {
70 return 'failed_imp_slt_parentobj_' . $this->getParentObjId();
71 }

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 105 of file class.ilTestSkillLevelThresholdImportFails.php.

105 : bool
106 {
107 return $this->getFailedImports() !== null;
108 }

References getFailedImports().

+ Here is the call graph for this function:

◆ getFailedImports()

ilTestSkillLevelThresholdImportFails::getFailedImports ( )
Returns
ilAssQuestionAssignedSkillList|null

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

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

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 114 of file class.ilTestSkillLevelThresholdImportFails.php.

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

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

+ Here is the call graph for this function:

◆ getParentObjId()

ilTestSkillLevelThresholdImportFails::getParentObjId ( )
protected
Returns
int

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

60 : int
61 {
62 return $this->parentObjId;
63 }

References $parentObjId.

Referenced by buildSettingsKey().

+ Here is the caller graph for this function:

◆ getSettings()

ilTestSkillLevelThresholdImportFails::getSettings ( )
protected
Returns
ilSetting

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

48 : ilSetting
49 {
50 if ($this->settings === null) {
51 $this->settings = new ilSetting('assimportfails');
52 }
53
54 return $this->settings;
55 }
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 90 of file class.ilTestSkillLevelThresholdImportFails.php.

91 {
92 $this->getSettings()->set($this->buildSettingsKey(), serialize($skillList));
93 }

References buildSettingsKey(), and getSettings().

+ Here is the call graph for this function:

Field Documentation

◆ $parentObjId

ilTestSkillLevelThresholdImportFails::$parentObjId
protected

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

Referenced by __construct(), and getParentObjId().

◆ $settings

ilTestSkillLevelThresholdImportFails::$settings
protected

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

Referenced by getSettings().


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