From 4ad7afb9f8927069bac90bc686eeeb25b8b6a581 Mon Sep 17 00:00:00 2001 From: Matheus Zych Date: Mon, 9 Feb 2026 07:55:43 +0100 Subject: [PATCH] Fixes question order in manual scoring when question oriented and one by one --- .../ILIAS/Test/src/Scoring/Manual/Positions.php | 2 +- .../Test/tests/Scoring/Manual/PositionsTest.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/ILIAS/Test/src/Scoring/Manual/Positions.php b/components/ILIAS/Test/src/Scoring/Manual/Positions.php index 1b77cfe89706..2a429528a390 100644 --- a/components/ILIAS/Test/src/Scoring/Manual/Positions.php +++ b/components/ILIAS/Test/src/Scoring/Manual/Positions.php @@ -112,7 +112,7 @@ static function (array $c, ?array $v): array { return [null]; } - if (!$mode->isUserCentric()) { + if (!$mode->isUserCentric() && !$mode->isSingle()) { usort($reordered_positions, static fn($a, $b) => $a[1][0] <=> $b[1][0]); } diff --git a/components/ILIAS/Test/tests/Scoring/Manual/PositionsTest.php b/components/ILIAS/Test/tests/Scoring/Manual/PositionsTest.php index a42a66e7ea08..d0719897548e 100644 --- a/components/ILIAS/Test/tests/Scoring/Manual/PositionsTest.php +++ b/components/ILIAS/Test/tests/Scoring/Manual/PositionsTest.php @@ -105,15 +105,15 @@ public function testPositionsModeSingleByQuestion(): void ); $expected = [ [[100],[400]], - [[102],[400]], [[100],[401]], - [[101],[401]], [[100],[402]], - [[102],[402]], [[100],[403]], + [[101],[401]], [[101],[403]], - [[103],[403]], - [[102],[404]] + [[102],[400]], + [[102],[402]], + [[102],[404]], + [[103],[403]] ]; $this->assertEquals($expected, $this->positions->get($mode)); } @@ -141,8 +141,8 @@ public function testPositionsFilter(): void $expected = [ [[100],[400]], - [[102],[400]], [[100],[402]], + [[102],[400]], [[102],[402]], [[102],[404]] ];