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

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

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

◆ deleteRegisteredImportFails()

ilAssQuestionSkillAssignmentImportFails::deleteRegisteredImportFails ( )

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

References getFailedImports().

+ Here is the call graph for this function:

◆ getFailedImports()

ilAssQuestionSkillAssignmentImportFails::getFailedImports ( )
Returns
ilAssQuestionSkillAssignmentImportList|null

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

References buildSettingsKey(), and getSettings().

Referenced by failedImportsRegistered(), and getFailedImportsMessage().

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

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

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

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

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

◆ 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  {
38  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportList.php';
39  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentRegistry.php';
40  $this->settings = new ilAssQuestionSkillAssignmentRegistry(new ilSetting('assimportfails'));
41  }
42 
43  return $this->settings;
44  }
ILIAS Setting Class.
Class ilAssQuestionSkillAssignmentRegistry.
settings()
Definition: settings.php:2
+ 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 80 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: