Kevin Owino
Kevin Owino

Reputation: 540

Storing Data Temporarily in Django to be accessed across multiple Devices

I am working on an e-learning platform I have a scenario where a student is doing an timed exam and either their computer crashes or power failure, and hence so computer shuts down What would be a good way to store this information, such that when the user logs in again to their computer or a different device, they can continue from where they left, with the already answered questions. Thanks in advance

Upvotes: 0

Views: 119

Answers (1)

sureshvv
sureshvv

Reputation: 4422

Using a PWA (Progressive Web App) is the way to go. It does not have to be a total loss of power; even a temporary loss of internet connectivity can cause problems. A PWA can cache the results and sync with the remote server as needed.

Another option is to use a JS framework like alpine/petite-vue to interact with the user and then make a post on submit.

In both cases you can use localstorage to store intermediate results so that the user can continue where they left off.

Upvotes: 1

Related Questions