Skip to content

Commit

Permalink
Test: Fix Detailed evaluation show questions not answered (#8794)
Browse files Browse the repository at this point in the history
* Test: Fix Detailed evaluation show questions not answered

https://mantis.ilias.de/view.php?id=43469

* Test: Fix Detailed evaluation show questions not answered (2)

https://mantis.ilias.de/view.php?id=43469

Additional fix for tests with multiple passes
  • Loading branch information
fneumann authored Jan 9, 2025
1 parent 9afe225 commit 14da94b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ protected function queryEvaluationData(array $active_ids): array
FROM tst_active
LEFT JOIN tst_test_result ON tst_active.active_id = tst_test_result.active_fi
LEFT JOIN tst_pass_result ON tst_active.active_id = tst_pass_result.active_fi
LEFT JOIN tst_test_result ON tst_active.active_id = tst_test_result.active_fi AND tst_test_result.pass = tst_pass_result.pass
LEFT JOIN qpl_questions ON qpl_questions.question_id = tst_test_result.question_fi
LEFT JOIN usr_data ON tst_active.user_fi = usr_data.usr_id
WHERE tst_active.test_fi = %s
AND %s
ORDER BY tst_active.active_id ASC, tst_test_result.pass ASC, tst_test_result.tstamp DESC
ORDER BY tst_active.active_id ASC, tst_pass_result.pass ASC, tst_test_result.tstamp DESC
';

$result = $this->db->query(
Expand Down Expand Up @@ -165,6 +165,7 @@ public function getEvaluationData(): ilTestEvaluationData
}

if ($current_attempt !== $row['pass']) {
$current_attempt = $row['pass'];
$attempt = new \ilTestEvaluationPassData();
$attempt->setPass($row['pass']);
$attempt->setReachedPoints($row['points']);
Expand Down

0 comments on commit 14da94b

Please sign in to comment.