Skip to content

Commit

Permalink
Test: Fix Missing Evaluation Data
Browse files Browse the repository at this point in the history
  • Loading branch information
kergomard committed Dec 16, 2024
1 parent 0dc7d2f commit 94bff3f
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions Modules/Test/classes/Evaluation/class.ilTestEvaluationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ protected function queryEvaluationData(array $active_ids): array
usr_data.title,
usr_data.login
FROM tst_test_result, qpl_questions, tst_active
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 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.active_id = tst_test_result.active_fi
AND qpl_questions.question_id = tst_test_result.question_fi
AND tst_active.test_fi = %s
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
Expand Down Expand Up @@ -185,14 +185,16 @@ public function getEvaluationData(): ilTestEvaluationData
$pass->setDeductedHintPoints($row['hint_points']);
}

$pass->addAnsweredQuestion(
$row["question_fi"],
$row["qpl_maxpoints"],
$row["result_points"],
(bool) $row['answered'],
null,
$row['manual']
);
if ($row['question_fi'] !== null) {
$pass->addAnsweredQuestion(
$row["question_fi"],
$row["qpl_maxpoints"],
$row["result_points"],
(bool) $row['answered'],
null,
$row['manual']
);
}

$user_eval_data->addPass($row['pass'], $pass);

Expand Down

0 comments on commit 94bff3f

Please sign in to comment.