Skip to content

Commit 1d8a1b6

Browse files
matheuszychthojou
authored andcommitted
Fixes question order in manual scoring when question oriented and one by one
1 parent 70d8698 commit 1d8a1b6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

components/ILIAS/Test/src/Scoring/Manual/Positions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static function (array $c, ?array $v): array {
112112
return [null];
113113
}
114114

115-
if (!$mode->isUserCentric()) {
115+
if (!$mode->isUserCentric() && !$mode->isSingle()) {
116116
usort($reordered_positions, static fn($a, $b) => $a[1][0] <=> $b[1][0]);
117117
}
118118

components/ILIAS/Test/tests/Scoring/Manual/PositionsTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ public function testPositionsModeSingleByQuestion(): void
105105
);
106106
$expected = [
107107
[[100],[400]],
108-
[[102],[400]],
109108
[[100],[401]],
110-
[[101],[401]],
111109
[[100],[402]],
112-
[[102],[402]],
113110
[[100],[403]],
111+
[[101],[401]],
114112
[[101],[403]],
115-
[[103],[403]],
116-
[[102],[404]]
113+
[[102],[400]],
114+
[[102],[402]],
115+
[[102],[404]],
116+
[[103],[403]]
117117
];
118118
$this->assertEquals($expected, $this->positions->get($mode));
119119
}
@@ -141,8 +141,8 @@ public function testPositionsFilter(): void
141141

142142
$expected = [
143143
[[100],[400]],
144-
[[102],[400]],
145144
[[100],[402]],
145+
[[102],[400]],
146146
[[102],[402]],
147147
[[102],[404]]
148148
];

0 commit comments

Comments
 (0)