T&A: Ghost Attempts & correct detection of unfinished test passes #8825
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi everyone,
with this PR, I propose a change to correctly recognize unfinished test attempts. Originally this is a fix for 28447, but I was able to find some other places that should be fixed with this change:
Reproduction
To reproduce the behavior, make sure that the test has at least the following settings:
Cause of the behavior
\ilObjTest::isExecutable
)self::_getPass($active_id)
returns a pass that doesn't exist\ilTestPassFinishTasks::performFinishTasks
)Tests
To verify this change, I tested the following scenarios and checked whether the number of passes and the unfinished passes are shown as expected.
I ran these four cases both for a test without a time limit and for a test with a limit, both with and without a reset. I also checked the database to see if there are any ghost passes.
I am looking forward to your feedback and comments. This PR was internally reviewed by @thojou .
Best,
@lukas-heinrich