From 5682fecb12a2a40224f6e9af5facadf1b12a9795 Mon Sep 17 00:00:00 2001 From: Stephan Kergomard Date: Wed, 19 Feb 2025 11:24:51 +0100 Subject: [PATCH] Test: Show Participants in Manual Scoring See: https://mantis.ilias.de/view.php?id=44033 --- Modules/Test/classes/class.ilObjTest.php | 40 +----------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/Modules/Test/classes/class.ilObjTest.php b/Modules/Test/classes/class.ilObjTest.php index 0cbf007f04ae..898d8b091fe4 100755 --- a/Modules/Test/classes/class.ilObjTest.php +++ b/Modules/Test/classes/class.ilObjTest.php @@ -4834,33 +4834,8 @@ public function getTestParticipantsForManualScoring($filter = null): array $participants = &$this->getTestParticipants(); $filtered_participants = []; foreach ($participants as $active_id => $participant) { - $qstType_IN_manScoreableQstTypes = $this->db->in('qpl_questions.question_type_fi', $scoring, false, 'integer'); - - $queryString = " - SELECT tst_test_result.manual - - FROM tst_test_result - - INNER JOIN qpl_questions - ON tst_test_result.question_fi = qpl_questions.question_id - - WHERE tst_test_result.active_fi = %s - AND $qstType_IN_manScoreableQstTypes - "; - - $result = $this->db->queryF( - $queryString, - ["integer"], - [$active_id] - ); - - $count = $result->numRows(); - - if ($count > 0) { + if ($participant['tries'] > 0) { switch ($filter) { - case 3: // all users - $filtered_participants[$active_id] = $participant; - break; case 4: if ($this->testManScoringDoneHelper->isDone((int) $active_id)) { $filtered_participants[$active_id] = $participant; @@ -4871,21 +4846,8 @@ public function getTestParticipantsForManualScoring($filter = null): array $filtered_participants[$active_id] = $participant; } break; - case 6: - // partially scored participants - $found = 0; - while ($row = $this->db->fetchAssoc($result)) { - if ($row["manual"]) { - $found++; - } - } - if (($found > 0) && ($found < $count)) { - $filtered_participants[$active_id] = $participant; - } - break; default: $filtered_participants[$active_id] = $participant; - break; } } }