ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAssQuestionSkillAssignmentImportFails Class Reference
+ Collaboration diagram for ilAssQuestionSkillAssignmentImportFails:

Public Member Functions

 __construct ($parentObjId)
 ilAssQuestionSkillAssignmentImportFails constructor. More...
 
 getFailedImports ()
 
 registerFailedImports (ilAssQuestionSkillAssignmentImportList $assignmentList)
 
 deleteRegisteredImportFails ()
 
 failedImportsRegistered ()
 
 getFailedImportsMessage (ilLanguage $lng)
 

Protected Member Functions

 getSettings ()
 
 getParentObjId ()
 
 buildSettingsKey ()
 

Protected Attributes

 $settings
 
 $parentObjId
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAssQuestionSkillAssignmentImportFails::__construct (   $parentObjId)

ilAssQuestionSkillAssignmentImportFails constructor.

Parameters
$parentObjId

Definition at line 26 of file class.ilAssQuestionSkillAssignmentImportFails.php.

References $parentObjId.

Member Function Documentation

◆ buildSettingsKey()

ilAssQuestionSkillAssignmentImportFails::buildSettingsKey ( )
protected
Returns
string

Definition at line 56 of file class.ilAssQuestionSkillAssignmentImportFails.php.

References getParentObjId().

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

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

◆ deleteRegisteredImportFails()

ilAssQuestionSkillAssignmentImportFails::deleteRegisteredImportFails ( )

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

References buildSettingsKey(), and getSettings().

Referenced by ilObjTestGUI\removeImportFailsObject(), and ilObjQuestionPoolGUI\renoveImportFailsObject().

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

◆ failedImportsRegistered()

ilAssQuestionSkillAssignmentImportFails::failedImportsRegistered ( )
Returns
bool

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

References getFailedImports().

+ Here is the call graph for this function:

◆ getFailedImports()

ilAssQuestionSkillAssignmentImportFails::getFailedImports ( )
Returns
ilAssQuestionSkillAssignmentImportList|null

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

References buildSettingsKey(), and getSettings().

Referenced by failedImportsRegistered(), and getFailedImportsMessage().

65  {
66  $value = $this->getSettings()->getStringifiedImports($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()

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

Definition at line 102 of file class.ilAssQuestionSkillAssignmentImportFails.php.

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

103  {
104  $handledSkills = array();
105  $msg = $lng->txt('tst_failed_imp_qst_skl_assign');
106 
107  $msg .= '<ul>';
108  foreach ($this->getFailedImports() as $assignmentImport) {
109  $sklBaseId = $assignmentImport->getImportSkillBaseId();
110  $sklTrefId = $assignmentImport->getImportSkillTrefId();
111 
112  if (isset($handledSkills["$sklBaseId:$sklTrefId"])) {
113  continue;
114  }
115 
116  $handledSkills["$sklBaseId:$sklTrefId"] = true;
117 
118  $msg .= '<li>' . $assignmentImport->getImportSkillTitle() . '</li>';
119  }
120  $msg .= '</ul>';
121 
122  return $msg;
123  }
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()

ilAssQuestionSkillAssignmentImportFails::getParentObjId ( )
protected
Returns
int

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

References $parentObjId.

Referenced by buildSettingsKey().

+ Here is the caller graph for this function:

◆ getSettings()

ilAssQuestionSkillAssignmentImportFails::getSettings ( )
protected
Returns
ilAssQuestionSkillAssignmentRegistry

Definition at line 34 of file class.ilAssQuestionSkillAssignmentImportFails.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.ilAssQuestionSkillAssignmentImportList.php';
38  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentRegistry.php';
39  $this->settings = new ilAssQuestionSkillAssignmentRegistry(new ilSetting('assimportfails'));
40  }
41 
42  return $this->settings;
43  }
settings()
Definition: settings.php:2
Class ilAssQuestionSkillAssignmentRegistry.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerFailedImports()

ilAssQuestionSkillAssignmentImportFails::registerFailedImports ( ilAssQuestionSkillAssignmentImportList  $assignmentList)
Parameters
ilAssQuestionSkillAssignmentImportList$assignmentList

Definition at line 78 of file class.ilAssQuestionSkillAssignmentImportFails.php.

References buildSettingsKey(), and getSettings().

Referenced by ilTestImporter\importQuestionSkillAssignments().

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

Field Documentation

◆ $parentObjId

ilAssQuestionSkillAssignmentImportFails::$parentObjId
protected

◆ $settings

ilAssQuestionSkillAssignmentImportFails::$settings
protected

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

Referenced by getSettings().


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