I'm creating an online quiz application.
- The quiz has a timer which will start counting down when the user start the quiz.
- The user is suppose to submit the answers when he finish the quiz.
- If he runs out of time, the answers are automatically submitted.
Now what I need is
- When a user start a quiz, I need to restrict him from opening other tabs or windows(To avoid use of google or any other sources where he can search for the answer). i.e., restrict him from minimizing the quiz window or opening any new tab/window/application
OR
- If he happen to move away from the quiz window(meaning he opens a new window or something), the answers should get submitted automatically and the result page should be displayed next time he come back to the quiz page.
I'm assuming this question does not require the code I use since the question is a general one. If the code is in fact needed, I'm sorry, please tell me and I will post here. I'm sorry if this is a duplicate question. I tried searching but I don't really know what keywords I should be looking for.
Any help is appreciated.