65 $this->thresholds = array();
73 SELECT test_fi, skill_base_fi, skill_tref_fi, skill_level_fi, threshold 74 FROM tst_skl_thresholds 80 while ($row = $this->db->fetchAssoc(
$res)) {
90 foreach ($this->thresholds as $skillKey => $skillLevels) {
91 foreach ($skillLevels as $levelThreshold) {
93 $levelThreshold->saveToDb();
103 $skillKey = $threshold->getSkillBaseId() .
':' . $threshold->getSkillTrefId();
104 $this->thresholds[$skillKey][$threshold->getSkillLevelId()] = $threshold;
115 $threshold->setTestId(
$data[
'test_fi']);
116 $threshold->setSkillBaseId(
$data[
'skill_base_fi']);
117 $threshold->setSkillTrefId(
$data[
'skill_tref_fi']);
118 $threshold->setSkillLevelId(
$data[
'skill_level_fi']);
119 $threshold->setThreshold(
$data[
'threshold']);
132 $skillKey = $skillBaseId .
':' . $skillTrefId;
134 if (isset($this->thresholds[$skillKey]) && isset($this->thresholds[$skillKey][$skillLevelId])) {
135 return $this->thresholds[$skillKey][$skillLevelId];
141 $threshold->setTestId($this->
getTestId());
142 $threshold->setSkillBaseId($skillBaseId);
143 $threshold->setSkillTrefId($skillTrefId);
144 $threshold->setSkillLevelId($skillLevelId);
154 foreach ($this->thresholds as $skillKey =>
$data) {
155 foreach (
$data as $levelId => $threshold) {
158 $threshold->setTestId(
$testId);
159 $threshold->saveToDb();
161 $threshold->setTestId($this->
getTestId());
__construct(ilDBInterface $db)
getThreshold($skillBaseId, $skillTrefId, $skillLevelId, $forceObject=false)
buildSkillLevelThresholdByArray($data)
cloneListForTest($testId)