I want to create an online exam, this exam has 5 pages, each page has a countdown timer (120 seconds) and 4 questions. After 120 seconds, users are automatically transferred to the next page, or they can click on the next button before.
Laravel5.4 and VueJs, there is an Ajax request for every question that the user answers. I want the user not to see other pages. Each page should be visible for a maximum of 120 seconds. The user should not be able to click the "Back" button and see previous pages. Is it even possible?
I want to create this application with Vuejs and vue-router , but I do not know how to implement this with vue-router , I did some research, but got few results!
Or maybe I should not use vue-router and use my own simple router, for example:
$("#page1").show(); $("#page2").hide(); $("#page3").hide(); . . // after 120 secs $("#page1").hide(); $("#page2").show(); $("#page3").hide(); . . // i think this is not secure !
Any thoughts are appreciated. Thanks.
UPDATE: In this exam, the user can see a list of English words , randomly selected from the words table, and nothing more! The user clicks on every word that he believes knows its meaning! And an ajax request for each click to save the word id in the results table. In addition, there is a table fake_words , in which 50 words are randomly selected instead of actual words , if the user clicks on fake words more than 3 times, the test will fail. The end result will tell the user how many vocabulary skills he has.
UPDATE 2: I tried to do this using vue-router , but before starting the code, I thought that perhaps this should not be implemented using vue-router , because all questions are randomly obtained from the DB in one query, then before the beginning of the exam they are all sent (ajax) to the browser, now what should I do? Cut them into separate arrays and send each array of questions to one of my pages? I must do it? can I use only one v-for ? What if I decide to change the number of questions? Then I think that I have to touch my code every time and create a new page for vue-router or delete one of the pages.