When students participate in exams in Artemis it could be for various reasons, that they are not online for the whole exam. That's why the exams should be doable offline. The cirteria is that the student is online at the start of the exam and the end / final submission of the exam.
Describe the solution you'd like
When the exam starts the exam is loaded into a view independent service and is additionally stored in the local storage. When the student is offline he should be able to fully continue with the exam as if the student was online. When the browser is closed and reopened, the service should load the latest state from the local storage. If the browser is opened and there is no exam in the local storage, the exam should be downloaded again from the server. Every change should be stored in the according submission object in the service and be synced to local storage and the server (if it is available).
There popular concepts here are:
online first (try to get online version first -> if fail use cache as a fallback)
offline first (go firstly to cache and load -> if there is a new version, notify user)
Additional context
currently we use websockets to sync clients and server (stomp client)
maybe a service worker is a solution for these requirements
Is your feature request related to a problem?
When students participate in exams in Artemis it could be for various reasons, that they are not online for the whole exam. That's why the exams should be doable offline. The cirteria is that the student is online at the start of the exam and the end / final submission of the exam.
Describe the solution you'd like
When the exam starts the exam is loaded into a view independent service and is additionally stored in the local storage. When the student is offline he should be able to fully continue with the exam as if the student was online. When the browser is closed and reopened, the service should load the latest state from the local storage. If the browser is opened and there is no exam in the local storage, the exam should be downloaded again from the server. Every change should be stored in the according submission object in the service and be synced to local storage and the server (if it is available).
There popular concepts here are:
Additional context