Univention Bugzilla – Bug 51165
Harden computerroom module frontend against side effects and provide better error message
Last modified: 2020-07-30 15:13:58 CEST
A customer managed to produce a situation where the computer room was not in exam mode anymore, but a finish_exam was triggered in the frontend producing an error since the frontend module had no information about any running exams anymore it could stop. We could reproduce this error neither in our testing environment nor on their systems, so we decided to improve the frontend by providing a more meaningful error message and check with the server again in case of error if there is an exam running or not.
Changes implemented in oschwieg/4.4/51165 Whenever the finish_exam function is triggered the UMC call to update the room info is triggered manually to make sure that the newest information of the room are available. If now there is no exam information present in the room, a message is shown to the user that the exam was apparently finished from somewhere else. It might be a good idea to have another look at the synchronization between the exam project file and the room file to see if there are situation where the information can be de-synced. How to reproduce the error message from the customer: - Start an exam and enter the computer room - Click on "Finish exam", but do not confirm the upcoming dialog yet. - On the server edit the file /var/cache/ucs-school-umc-computerroom/${ROOM_NAME} and remove the exam entries (exam=, examEndTime=, examDescription=) - Wait for the computer room in the UMC to update. You should see the exam mode specific elements in the computer room disappear. - Confirm the dialog to finish the exam - You will get a ValidationError, saying that exam is a required field (Before fixes). - You will get a message that the exam was apparently finished from somewhere else (after fixes). This fixes in no way the underlying problem of the customer loosing the exam information from the frontend in between finishing the exam, but this is about all we can achieve in the frontend alone. After the newest updates for UCS and UCS@school are installed on the customer machines, we want to try triggering this problem again. Please REOPEN for merge&build
QA -> all ok => please merge and build [oschwieg/4.4/51165] 551fea258 Bug #51165: Check room status before finishing exam and provide better error message in frontend Code -> looks good Functionality -> works as expected before fix, a ValidationError is thrown after fix, I got the msg "There is no exam running in this room anymore. It seems like the exam was finished properly from somewhere else." (also in german).
Package: ucs-school-umc-computerroom Version: 11.0.0-19A~4.4.0.202004241449 Branch: ucs_4.4-0 Scope: ucs-school-4.4 Package build
yaml -> ok changelog -> ok [4.4] 989e14545 Bug #51165: Fill advisory [4.4] 137f0c7e9 Bug #51165: Add advisory [4.4] a84a52aa8 Bug #51165: Add changelog [4.4] d632cf6c1 Bug #51165: Check room status before finishing exam and provide better error message in frontend
UCS@school 4.5 v5 has been released (errata update to the release). http://docs.software-univention.de/changelog-ucsschool-4.4v5-de.html#changelog:ucsschool:2020-04-27 If this error occurs again, please clone this bug.