ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 array, getAssignmentList(), getThresholdList(), and getXmlWriter().

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