ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 41 of file class.ilAssQuestionSkillAssignmentImportFails.php.

References $parentObjId.

Member Function Documentation

◆ buildSettingsKey()

ilAssQuestionSkillAssignmentImportFails::buildSettingsKey ( )
protected
Returns
string

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

References getParentObjId().

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

71  : string
72  {
73  return 'failed_imp_qsa_parentobj_' . $this->getParentObjId();
74  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteRegisteredImportFails()

ilAssQuestionSkillAssignmentImportFails::deleteRegisteredImportFails ( )

Definition at line 100 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 108 of file class.ilAssQuestionSkillAssignmentImportFails.php.

References getFailedImports().

108  : bool
109  {
110  return $this->getFailedImports() !== null;
111  }
+ Here is the call graph for this function:

◆ getFailedImports()

ilAssQuestionSkillAssignmentImportFails::getFailedImports ( )
Returns
ilAssQuestionSkillAssignmentImportList|null

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

References buildSettingsKey(), and getSettings().

Referenced by failedImportsRegistered(), and getFailedImportsMessage().

80  {
81  $value = $this->getSettings()->getStringifiedImports($this->buildSettingsKey(), null);
82 
83  if ($value !== null) {
84  return unserialize($value);
85  }
86 
87  return null;
88  }
+ 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 117 of file class.ilAssQuestionSkillAssignmentImportFails.php.

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

117  : string
118  {
119  $handledSkills = array();
120  $msg = $lng->txt('tst_failed_imp_qst_skl_assign');
121 
122  $msg .= '<ul>';
123  foreach ($this->getFailedImports() as $assignmentImport) {
124  $sklBaseId = $assignmentImport->getImportSkillBaseId();
125  $sklTrefId = $assignmentImport->getImportSkillTrefId();
126 
127  if (isset($handledSkills["$sklBaseId:$sklTrefId"])) {
128  continue;
129  }
130 
131  $handledSkills["$sklBaseId:$sklTrefId"] = true;
132 
133  $msg .= '<li>' . $assignmentImport->getImportSkillTitle() . '</li>';
134  }
135  $msg .= '</ul>';
136 
137  return $msg;
138  }
txt(string $a_topic, string $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 63 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 49 of file class.ilAssQuestionSkillAssignmentImportFails.php.

References $settings, and ILIAS\Repository\settings().

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

50  {
51  if ($this->settings === null) {
52  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportList.php';
53  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentRegistry.php';
54  $this->settings = new ilAssQuestionSkillAssignmentRegistry(new ilSetting('assimportfails'));
55  }
56 
57  return $this->settings;
58  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ 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 93 of file class.ilAssQuestionSkillAssignmentImportFails.php.

References buildSettingsKey(), and getSettings().

Referenced by ilTestImporter\importQuestionSkillAssignments().

93  : void
94  {
95  $this->getSettings()->setStringifiedImports($this->buildSettingsKey(), serialize($assignmentList));
96  }
+ 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 30 of file class.ilAssQuestionSkillAssignmentImportFails.php.

Referenced by getSettings().


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