4 require_once
'Modules/Test/classes/class.ilTestSkillLevelThreshold.php';
52 $this->thresholds =
array();
60 SELECT test_fi, skill_base_fi, skill_tref_fi, skill_level_fi, threshold 61 FROM tst_skl_thresholds 67 while(
$row = $this->db->fetchAssoc(
$res) )
78 foreach($this->thresholds as $skillKey => $skillLevels)
80 foreach($skillLevels as $levelThreshold)
83 $levelThreshold->saveToDb();
93 $skillKey = $threshold->getSkillBaseId().
':'.$threshold->getSkillTrefId();
94 $this->thresholds[$skillKey][$threshold->getSkillLevelId()] = $threshold;
105 $threshold->setTestId(
$data[
'test_fi']);
106 $threshold->setSkillBaseId(
$data[
'skill_base_fi']);
107 $threshold->setSkillTrefId(
$data[
'skill_tref_fi']);
108 $threshold->setSkillLevelId(
$data[
'skill_level_fi']);
109 $threshold->setThreshold(
$data[
'threshold']);
120 public function getThreshold($skillBaseId, $skillTrefId, $skillLevelId, $forceObject =
false)
122 $skillKey = $skillBaseId .
':' . $skillTrefId;
124 if( isset($this->thresholds[$skillKey]) && isset($this->thresholds[$skillKey][$skillLevelId]) )
126 return $this->thresholds[$skillKey][$skillLevelId];
133 $threshold->setTestId($this->
getTestId());
134 $threshold->setSkillBaseId($skillBaseId);
135 $threshold->setSkillTrefId($skillTrefId);
136 $threshold->setSkillLevelId($skillLevelId);
146 foreach($this->thresholds as $skillKey =>
$data)
148 foreach(
$data as $levelId => $threshold)
152 $threshold->setTestId(
$testId);
153 $threshold->saveToDb();
155 $threshold->setTestId($this->
getTestId());
__construct(ilDBInterface $db)
getThreshold($skillBaseId, $skillTrefId, $skillLevelId, $forceObject=false)
buildSkillLevelThresholdByArray($data)
cloneListForTest($testId)
Create styles array
The data for the language used.