ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 56 of file class.ilTestSkillLevelThresholdImportFails.php.

References getParentObjId().

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

57  {
58  return 'failed_imp_slt_parentobj_' . $this->getParentObjId();
59  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteRegisteredImportFails()

ilTestSkillLevelThresholdImportFails::deleteRegisteredImportFails ( )

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

References buildSettingsKey(), and getSettings().

Referenced by ilObjTestGUI\removeImportFailsObject().

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

◆ failedImportsRegistered()

ilTestSkillLevelThresholdImportFails::failedImportsRegistered ( )
Returns
bool

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

References getFailedImports().

+ Here is the call graph for this function:

◆ getFailedImports()

ilTestSkillLevelThresholdImportFails::getFailedImports ( )
Returns
ilAssQuestionAssignedSkillList|null

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

References buildSettingsKey(), and getSettings().

Referenced by failedImportsRegistered(), and getFailedImportsMessage().

65  {
66  $value = $this->getSettings()->get($this->buildSettingsKey(), null);
67 
68  if ($value !== null) {
69  return unserialize($value);
70  }
71 
72  return null;
73  }
+ 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 102 of file class.ilTestSkillLevelThresholdImportFails.php.

References ilSkillTreeNode\_lookupTitle(), getFailedImports(), and ilLanguage\txt().

103  {
104  require_once 'Services/Skill/classes/class.ilBasicSkill.php';
105 
106  $msg = $lng->txt('tst_failed_imp_skl_thresholds');
107 
108  $msg .= '<ul>';
109  foreach ($this->getFailedImports() as $skillKey) {
110  list($skillBaseId, $skillTrefId) = explode(':', $skillKey);
111  $skillTitle = ilBasicSkill::_lookupTitle($skillBaseId, $skillTrefId);
112 
113  $msg .= '<li>' . $skillTitle . '</li>';
114  }
115  $msg .= '</ul>';
116 
117  return $msg;
118  }
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
txt($a_topic, $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:

◆ getParentObjId()

ilTestSkillLevelThresholdImportFails::getParentObjId ( )
protected
Returns
int

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

References $parentObjId.

Referenced by buildSettingsKey().

+ Here is the caller graph for this function:

◆ getSettings()

ilTestSkillLevelThresholdImportFails::getSettings ( )
protected
Returns
ilSetting

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

References $settings, and settings().

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

35  {
36  if ($this->settings === null) {
37  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionAssignedSkillList.php';
38 
39  $this->settings = new ilSetting('assimportfails');
40  }
41 
42  return $this->settings;
43  }
settings()
Definition: settings.php:2
+ 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 78 of file class.ilTestSkillLevelThresholdImportFails.php.

References buildSettingsKey(), and getSettings().

Referenced by ilTestImporter\importSkillLevelThresholds().

+ Here is the call graph for this function:
+ Here is the caller 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: