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

Public Member Functions

 __construct ()
 ilAssQuestionSkillAssignmentExporter constructor. More...
 
 getXmlWriter ()
 
 setXmlWriter (ilXmlWriter $xmlWriter)
 
 getAssignmentList ()
 
 setAssignmentList ($assignmentList)
 
 getThresholdList ()
 
 setThresholdList ($thresholdList)
 
 export ()
 

Protected Attributes

 $xmlWriter
 
 $assignmentList
 
 $thresholdList
 

Detailed Description

Definition at line 10 of file class.ilTestSkillLevelThresholdExporter.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestSkillLevelThresholdExporter::__construct ( )

ilAssQuestionSkillAssignmentExporter constructor.

Definition at line 30 of file class.ilTestSkillLevelThresholdExporter.php.

31  {
32  $this->xmlWriter = null;
33  }

Member Function Documentation

◆ export()

ilTestSkillLevelThresholdExporter::export ( )

Definition at line 83 of file class.ilTestSkillLevelThresholdExporter.php.

References $i, getAssignmentList(), getThresholdList(), and getXmlWriter().

84  {
85  $this->getXmlWriter()->xmlStartTag('SkillsLevelThresholds');
86 
87  foreach ($this->getAssignmentList()->getUniqueAssignedSkills() as $assignedSkillData) {
88  $this->getXmlWriter()->xmlStartTag('QuestionsAssignedSkill', array(
89  'BaseId' => $assignedSkillData['skill_base_id'],
90  'TrefId' => $assignedSkillData['skill_tref_id']
91  ));
92 
93  $this->getXmlWriter()->xmlElement('OriginalSkillTitle', null, $assignedSkillData['skill_title']);
94  $this->getXmlWriter()->xmlElement('OriginalSkillPath', null, $assignedSkillData['skill_path']);
95 
96  /* @var ilBasicSkill $assignedSkill */
97  $assignedSkill = $assignedSkillData['skill'];
98  $skillLevels = $assignedSkill->getLevelData();
99 
100  for ($i = 0, $max = count($skillLevels); $i < $max; $i++) {
101  $levelData = $skillLevels[$i];
102 
103  $skillLevelThreshold = $this->getThresholdList()->getThreshold(
104  $assignedSkillData['skill_base_id'],
105  $assignedSkillData['skill_tref_id'],
106  $levelData['id'],
107  true
108  );
109 
110  $this->getXmlWriter()->xmlStartTag('SkillLevel', array(
111  'Id' => $levelData['id'], 'Nr' => $levelData['nr']
112  ));
113 
114  $this->getXmlWriter()->xmlElement('ThresholdPercentage', null, $skillLevelThreshold->getThreshold());
115 
116  $this->getXmlWriter()->xmlElement('OriginalLevelTitle', null, $levelData['title']);
117  $this->getXmlWriter()->xmlElement('OriginalLevelDescription', null, $levelData['description']);
118 
119  $this->getXmlWriter()->xmlEndTag('SkillLevel');
120  }
121 
122  $this->getXmlWriter()->xmlEndTag('QuestionsAssignedSkill');
123  }
124 
125  $this->getXmlWriter()->xmlEndTag('SkillsLevelThresholds');
126  }
$i
Definition: disco.tpl.php:19
+ Here is the call graph for this function:

◆ getAssignmentList()

ilTestSkillLevelThresholdExporter::getAssignmentList ( )
Returns
ilAssQuestionSkillAssignmentList

Definition at line 54 of file class.ilTestSkillLevelThresholdExporter.php.

References $assignmentList.

Referenced by export().

+ Here is the caller graph for this function:

◆ getThresholdList()

ilTestSkillLevelThresholdExporter::getThresholdList ( )
Returns
ilTestSkillLevelThresholdList

Definition at line 70 of file class.ilTestSkillLevelThresholdExporter.php.

References $thresholdList.

Referenced by export().

+ Here is the caller graph for this function:

◆ getXmlWriter()

ilTestSkillLevelThresholdExporter::getXmlWriter ( )
Returns
ilXmlWriter

Definition at line 38 of file class.ilTestSkillLevelThresholdExporter.php.

References $xmlWriter.

Referenced by export().

+ Here is the caller graph for this function:

◆ setAssignmentList()

ilTestSkillLevelThresholdExporter::setAssignmentList (   $assignmentList)
Parameters
ilAssQuestionSkillAssignmentList$assignmentList

Definition at line 62 of file class.ilTestSkillLevelThresholdExporter.php.

References $assignmentList.

◆ setThresholdList()

ilTestSkillLevelThresholdExporter::setThresholdList (   $thresholdList)
Parameters
ilTestSkillLevelThresholdList$thresholdList

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

References $thresholdList.

◆ setXmlWriter()

ilTestSkillLevelThresholdExporter::setXmlWriter ( ilXmlWriter  $xmlWriter)
Parameters
ilXmlWriter$xmlWriter

Definition at line 46 of file class.ilTestSkillLevelThresholdExporter.php.

References $xmlWriter.

Field Documentation

◆ $assignmentList

ilTestSkillLevelThresholdExporter::$assignmentList
protected

◆ $thresholdList

ilTestSkillLevelThresholdExporter::$thresholdList
protected

◆ $xmlWriter

ilTestSkillLevelThresholdExporter::$xmlWriter
protected

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

Referenced by getXmlWriter(), and setXmlWriter().


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