Alright. I am a beginner and I am unable to find a solution to this problem. I am developing this quizzing application. I have built the part that allows you to create and manage questions classified by difficulty and tags. But Im not able to think of a proper quiz logic.

I want a single page with question numbers and one question displayed at a time. And I want to be able to move back and forth by clicking the numbers and I should have some way of indicating the attempted questions. Then I need an option for a timer that would submit the questions automatically.

I really really donot know where to start. I found this http://rexaminator.com/ site. It has what I am talking about except I need the timer.

Please help me. Thanks in advance

5 Years
Discussion Span
Last Post by Taywin

The timer is the client side which could be implemented using JavaScript. The problem is that JavaScript can be manipulated by the client side. Therefore, it is not a good idea to do so when your application required some securities like this.

Anyway, you should not force clients to submit when the quiz time is up but rather display a timer on the page. Also, you need to check for the submission time against the starting time. Give a lee way of one or two minutes.

For example, record the time when a client starts the quiz (using Time.now from Date module -- require 'date'). Then check for the time again after the client submit the whole quiz answers. If the time different is over the limit by 2 minutes, reject the submission and the client is failed to finish the quiz.

Another approach is to save/update the client's answer each time the client move on to the next question. This way, you will be ensured that the quiz progress will be saved and no need to worry about forcing submission.


THank you. That is a good idea. I think I wont be needing that kinda security for the client side script because its gonna be a controlled and supervised test environment.

Anyway thanks for the tip regarding updating client's answers :). So I should create a table to store answers right? And then delete the temporary records after evaluating the results.

Thank you. Now I can proceed.


You could do that or you could save it in your actual database. The update record data is very simple so either way is fine.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.