ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilTestSkillLevelThresholdImportList.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
11 {
12  protected $originalSkillTitles = array();
13  protected $originalSkillPaths = array();
15 
16  public function addOriginalSkillTitle($skillBaseId, $skillTrefId, $originalSkillTitle)
17  {
18  $this->originalSkillTitles["{$skillBaseId}:{$skillTrefId}"] = $originalSkillTitle;
19  }
20 
21  public function addOriginalSkillPath($skillBaseId, $skillTrefId, $originalSkillPath)
22  {
23  $this->originalSkillPaths["{$skillBaseId}:{$skillTrefId}"] = $originalSkillPath;
24  }
25 
26  public function addSkillLevelThreshold(ilTestSkillLevelThresholdImport $importedSkillLevelThreshold)
27  {
28  $this->importedSkillLevelThresholds[] = $importedSkillLevelThreshold;
29  }
30 
31  public function getThresholdsByImportSkill($importSkillBaseId, $importSkillTrefId)
32  {
33  $thresholds = array();
34 
35  foreach($this as $skillLevelThreshold)
36  {
37  if( $skillLevelThreshold->getImportSkillBaseId() != $importSkillBaseId )
38  {
39  continue;
40  }
41 
42  if( $skillLevelThreshold->getImportSkillTrefId() != $importSkillTrefId )
43  {
44  continue;
45  }
46 
47  $thresholds[] = $skillLevelThreshold;
48  }
49 
50  return $thresholds;
51  }
52 
56  public function current()
57  {
58  return current($this->importedSkillLevelThresholds);
59  }
60 
64  public function next()
65  {
66  return next($this->importedSkillLevelThresholds);
67  }
68 
72  public function key()
73  {
74  return key($this->importedSkillLevelThresholds);
75  }
76 
80  public function valid()
81  {
82  return key($this->importedSkillLevelThresholds) !== null;
83  }
84 
88  public function rewind()
89  {
90  return reset($this->importedSkillLevelThresholds);
91  }
92 }
addOriginalSkillTitle($skillBaseId, $skillTrefId, $originalSkillTitle)
getThresholdsByImportSkill($importSkillBaseId, $importSkillTrefId)
addSkillLevelThreshold(ilTestSkillLevelThresholdImport $importedSkillLevelThreshold)
Create styles array
The data for the language used.
addOriginalSkillPath($skillBaseId, $skillTrefId, $originalSkillPath)