Skip to content

Commit

Permalink
Test: Correct Calculation of SkillLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
kergomard committed Dec 15, 2024
1 parent aaeffa8 commit b2f6f7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
10 changes: 2 additions & 8 deletions Modules/Test/classes/class.ilTestSkillEvaluation.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,6 @@ private function initTestResultData($testResults)
continue;
}

if (!$result['workedthrough']) {
continue;
}

$this->reachedPointsByQuestion[ $result['qid'] ] = $result['reached'];
}
}
Expand Down Expand Up @@ -254,8 +250,6 @@ private function bookToSkillPointAccount($skillBaseId, $skillTrefId, $maxSkillPo
private function evaluateSkillPointAccounts()
{
foreach ($this->skillPointAccounts as $skillKey => $skillPointAccount) {
/* @var ilTestSkillPointAccount $skillPointAccount */

if (!$this->doesNumBookingsExceedRequiredBookingsBarrier($skillPointAccount)) {
continue;
}
Expand All @@ -274,11 +268,11 @@ private function evaluateSkillPointAccounts()
continue;
}

$reachedLevelId = $level['id'];

if ($skillPointAccount->getTotalReachedSkillPercent() <= $threshold->getThreshold()) {
break;
}

$reachedLevelId = $level['id'];
}

if ($reachedLevelId) {
Expand Down
1 change: 0 additions & 1 deletion Modules/Test/classes/class.ilTestSkillEvaluationGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ public function setObjectiveOrientedContainer($objectiveOrientedContainer)
public function executeCommand()
{
$cmd = $this->ctrl->getCmd(self::CMD_SHOW) . 'Cmd';

$this->$cmd();
}

Expand Down
4 changes: 1 addition & 3 deletions Modules/Test/classes/class.ilTestSkillPointAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ public function getNumBookings(): int

public function getTotalReachedSkillPercent()
{
return (
($this->getTotalReachedSkillPoints() * 100) / $this->getTotalMaxSkillPoints()
);
return $this->getTotalReachedSkillPoints() * 100 / $this->getTotalMaxSkillPoints();
}
}

0 comments on commit b2f6f7a

Please sign in to comment.