Artemis
Artemis copied to clipboard
`Exam mode`: Persist live statistics actions
Checklist
General
- [ ] I tested all changes and their related features with all corresponding user types on a test server.
- [x] Language: I followed the guidelines for inclusive, diversity-sensitive, and appreciative language.
- [x] I chose a title conforming to the naming conventions for pull requests.
Server
- [x] I followed the coding and design guidelines.
- [x] I added multiple integration tests (Spring) related to the features (with a high test coverage).
- [x] I documented the Java code using JavaDoc style.
Motivation and Context
In order to store the performed actions, we need to provide a database schema. In addition, we want to store the actions during the night.
Description
- Added some Entities
- Updated the save logic (we persist the actions at 3 am)
Steps for Testing
Prerequisites:
- 1 Instructor
- One/Multiple Student
- 1 Exam
- Log in to Artemis
- Create an Exam with Exam Live Statistics enabled
- Participate with the student
- Verify that the sections work as expected
- Verify that the actions are stored in the database
Review Progress
Code Review
- [ ] Review 1
- [ ] Review 2
Manual Tests
- [ ] Test 1
- [ ] Test 2
Test Coverage
| Class/File | Branch | Line |
|---|---|---|
| ExamMonitoringScheduleService.java | 80% | 91% |
Screenshots

I am not sure about the onDelete="CASCADE" in the foreign key constraints. I don't think we should delete an exercise if an exam action is deleted.
This won't affect any exercise -> verified via test (if we delete the ExamAction, we keep the Exercise)
What happens if we delete a student exam or the whole exam? Or in case we reset it? Are all actions cleaned up properly beforehand so there are no exceptions?
Yes, once we delete the StudentExam, we delete the ExamActivity and all ExamActions. So there should be no issues.
Looking at the UML class diagram, I think the exam_activity is somehow not really needed. An action could be connected to the student exam directly, which would save quite a few database rows. In addition, it is indirectly connected to the student exam anyway over the exam session, so we might be able to reduce redundancy here as well, at least on the database level.
At the beginning of my thesis, we decided to keep the system extensible, so I would leave it as is to provide an easy way to add future values :+1: And in addition, this change would need additional refactoring which is out of the scope.
In previous cases (plagiarism checks) we had issues with table that contain a lot of data and had unnecessary foreign keys. Keep in mind that big int (which is needed for foreign keys) really use a lot of data when you have 1 mio entries in the database.
Interesting - but if we clean the system regularly (cleanup old exams, we probably won't reach the one million actions) - so i think its good as it is :+1: But sure, we should keep an eye on it
I added some larger tests - one test regarding the scheduling is still missing, i will try to implement this the next days :+1:
in the current state we cannot merge this PR as it would lead to database issues in case of large exams
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.