开发者

How to store user actions/answers while taking an online exam to be retrieved if connection is down?

For an online examination system, user actions/answers to be stored and later retrieved if user connection is down.

Which logic should be preferred, client side logic [cookie], or server side logic [Session/Database]?

[Edit]

How user answ开发者_高级运维ers will be stored? using specific timer interval for storing user answers? or after specific parts of exam? What is best practice for implementing such solutions?


If you want the answers to be available even when the user connection is down, you need to store them on the client side. If they end up being more than you can fit in a cookie, try a library like PersistJS.


As long as you are timing the exam on serverside you can use a cookie to store the data required to remember the options checked. But if the client does not respond even after the duration of the examination is over we would need to invalidate the cookies. I am assuming you submit the data at the end of the exam here.

Cookies are generally used to store user information in most sites with an application form to enhance user experience. Here's a link on implementing Javascript cookies

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜