Affects Version/s: None
When a user takes a test in a course multiple times he generates multiple test sessions. For the grading tool and the course assessment system the last test session always wins.
It is common (specially when by a misconfiguration the user is allowed to take a test multiple times) that users start a test a second time but actually don't really finish it. In those cases the grating tool is not available anymore for the last valid test.
The solution is to add a "invalid" status to test sessions. We do not want to delete them, we just invalidate them.
- Extend the test session data model to reflect the "invalid" status
- Ignore invalid test sessions in all relevant queries
- Excel exports
- Test statistics
- Grading assignments (only OO 15)
- Cleanup everything on status change valid to invalid and vice-versa
- Take in running tests
- Cancel grading assignments (only OO 15)
- Add action links to test-session table to initiate the status change
- Mark invalid test sessions in table with strike-through and the last valid test
- Dialog to execute status change
- Ask if score of new last valid test session shall be used for scoring