Skip to content

T&A 48420: Fix Manual Scoring Null Sequence - #12179

Open
aaronbidzan wants to merge 2 commits into
ILIAS-eLearning:release_10from
aaronbidzan:ta/10/48420
Open

aaronbidzan wants to merge 2 commits into
ILIAS-eLearning:release_10from
aaronbidzan:ta/10/48420

Conversation

@aaronbidzan

Copy link
Copy Markdown
Contributor

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

Opening the Manual Scoring tab sorted questions by getPlaceInSequence(). Random tests never attach sequence information, so that call ran on null and the tab ended in a whoops. A random question set has no shared sequence, so the sort is skipped there. Fixed tests still sort by place in sequence, and only after the empty-list return.

Kind regards,
@aaronbidzan

/cc @thojou

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

Opening the Manual Scoring tab sorted questions by `getPlaceInSequence()`.
Random tests never attach sequence information, so that call ran on
null and the tab ended in a whoops. A random question set has no
shared sequence, so the sort is skipped there. Fixed tests still
sort by place in sequence, and only after the empty-list return.
@dsstrassner dsstrassner added bugfix php Pull requests that update Php code labels Oct 7, 2026

@dsstrassner dsstrassner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this locally, and now the manual scoring works again with random question selection. Thanks, @aaronbidzan, for the prompt fix.
Obviously I can't say if the other code authorities are agreeing with the code changes. Or if they preferred another way 😁

@thojou

thojou commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Hey @dsstrassner,

I discussed internally with @aaronbidzan whether we could move the sorting logic into the repository function itself, so that the list of questions is returned in the correct order.

We are currently checking whether this could introduce any side effects. If not, @aaronbidzan will provide a small update, and I can proceed with the merge.

Kind regards,
@thojou

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

Manual Scoring and the questions table both sorted a test's questions
by place in sequence. `buildQuestionPropertiesForFixedTest()` now
returns that order, with question ids kept as keys. Random tests are
unchanged because they have no shared sequence. The two consumer
sorts are removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants