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.

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

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

◆ deleteRegisteredImportFails()

ilTestSkillLevelThresholdImportFails::deleteRegisteredImportFails ( )

Definition at line 87 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 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.

References buildSettingsKey(), and getSettings().

Referenced by failedImportsRegistered(), and getFailedImportsMessage().

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  }
+ 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.

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

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.
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

◆ 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  {
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
+ 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.

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: