ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 26 of file class.ilTestSkillLevelThresholdImportFails.php.

References $parentObjId.

Member Function Documentation

◆ buildSettingsKey()

ilTestSkillLevelThresholdImportFails::buildSettingsKey ( )
protected
Returns
string

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

58 {
59 return 'failed_imp_slt_parentobj_'.$this->getParentObjId();
60 }

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

+ Here is the caller graph for this function:

◆ deleteRegisteredImportFails()

ilTestSkillLevelThresholdImportFails::deleteRegisteredImportFails ( )

◆ failedImportsRegistered()

ilTestSkillLevelThresholdImportFails::failedImportsRegistered ( )
Returns
bool

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

References getFailedImports().

+ Here is the call graph for this function:

◆ getFailedImports()

ilTestSkillLevelThresholdImportFails::getFailedImports ( )
Returns
ilAssQuestionAssignedSkillList|null

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

66 {
67 $value = $this->getSettings()->get($this->buildSettingsKey(), null);
68
69 if( $value !== null )
70 {
71 return unserialize($value);
72 }
73
74 return null;
75 }

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

105 {
106 require_once 'Services/Skill/classes/class.ilBasicSkill.php';
107
108 $msg = $lng->txt('tst_failed_imp_skl_thresholds');
109
110 $msg .= '<ul>';
111 foreach($this->getFailedImports() as $skillKey)
112 {
113 list($skillBaseId, $skillTrefId) = explode(':', $skillKey);
114 $skillTitle = ilBasicSkill::_lookupTitle($skillBaseId, $skillTrefId);
115
116 $msg .= '<li>'.$skillTitle.'</li>';
117 }
118 $msg .= '</ul>';
119
120 return $msg;
121 }
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
global $lng
Definition: privfeed.php:17

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

+ Here is the call graph for this function:

◆ getParentObjId()

ilTestSkillLevelThresholdImportFails::getParentObjId ( )
protected
Returns
int

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

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

References $parentObjId.

◆ getSettings()

ilTestSkillLevelThresholdImportFails::getSettings ( )
protected
Returns
ilSetting

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

35 {
36 if( $this->settings === null )
37 {
38 require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionAssignedSkillList.php';
39
40 $this->settings = new ilSetting('assimportfails');
41 }
42
43 return $this->settings;
44 }
ILIAS Setting Class.
settings()
Definition: settings.php:2

References $settings, and 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 80 of file class.ilTestSkillLevelThresholdImportFails.php.

81 {
82 $this->getSettings()->set($this->buildSettingsKey(), serialize($skillList));
83 }

References buildSettingsKey(), and getSettings().

+ Here is the call graph for this function:

Field Documentation

◆ $parentObjId

ilTestSkillLevelThresholdImportFails::$parentObjId
protected

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

Referenced by __construct(), and getParentObjId().

◆ $settings

ilTestSkillLevelThresholdImportFails::$settings
protected

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

Referenced by getSettings().


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