Skip to content

Commit

Permalink
Test: Fix Results Table
Browse files Browse the repository at this point in the history
  • Loading branch information
kergomard committed Oct 14, 2022
1 parent bee2b5c commit cccc23b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Modules/Test/classes/class.ilTestParticipantList.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,13 @@ public function buildScoringsQuery(): string

$query = "
SELECT * FROM tst_result_cache tres
INNER JOIN tst_pass_result pres
ON pres.active_fi = tres.active_fi
AND pres.pass = tres.pass
$closedScoringsOnly
WHERE $IN_activeIds
";

Expand Down Expand Up @@ -350,7 +350,7 @@ public function getScoringsTableRows(): array
$row['percent_result'] = $participant->getScoring()->getPercentResult();
$row['passed_status'] = $participant->getScoring()->isPassed();
$row['final_mark'] = $participant->getScoring()->getFinalMark();
$row['last_scored_access'] = ilObjTest::lookupLastTestPassAccess(
$row['scored_pass_finished_timestamp'] = ilObjTest::lookupLastTestPassAccess(
$participant->getActiveId(),
$participant->getScoring()->getScoredPass()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function fillRow(array $a_set): void
$this->tpl->setVariable("FULLNAME", $a_set['name']);

$this->tpl->setVariable("SCORED_PASS", $this->buildScoredPassString($a_set));
$this->tpl->setVariable("PASS_FINISHED", $this->buildPassFinishedString($a_set));
$this->tpl->setVariable("SCORED_PASS_FINISHED", $this->buildScoredPassFinishedString($a_set));

$this->tpl->setVariable("ANSWERED_QUESTIONS", $this->buildAnsweredQuestionsString($a_set));
$this->tpl->setVariable("REACHED_POINTS", $this->buildReachedPointsString($a_set));
Expand Down Expand Up @@ -240,10 +240,10 @@ protected function buildScoredPassString(array $data): string
return $this->lng->txt('pass') . ' ' . ($data['scored_pass'] + 1);
}

protected function buildPassFinishedString(array $data): string
protected function buildScoredPassFinishedString(array $data): string
{
if (isset($data['pass_finished'])) {
return ilDatePresentation::formatDate(new ilDateTime($data['pass_finished'], IL_CAL_UNIX));
if (isset($data['scored_pass_finished_timestamp'])) {
return ilDatePresentation::formatDate(new ilDateTime($data['scored_pass_finished_timestamp'], IL_CAL_UNIX));
}
return '';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
<!-- END checkbox_column -->
<td class="std" style="vertical-align: top"><label for="cb_{ROW_KEY}">{FULLNAME}</label></td>
<td class="std" style="vertical-align: top"><label for="cb_{ROW_KEY}">{LOGIN}</label></td>
<td class="std" style="vertical-align: top">{FINISHED_PASSES}</td>
<td class="std" style="vertical-align: top">{SCORED_PASS}</td>
<td class="std" style="vertical-align: top">{LAST_SCORED_ACCESS}</td>
<td class="std" style="vertical-align: top">{SCORED_PASS_FINISHED}</td>
<td class="std" style="vertical-align: top">{ANSWERED_QUESTIONS}</td>
<td class="std" style="vertical-align: top">{REACHED_POINTS}</td>
<td class="std" style="vertical-align: top">{PERCENT_RESULT}</td>
Expand Down

0 comments on commit cccc23b

Please sign in to comment.