views:

32

answers:

1

Hi Experts,

I am trying to create an Online Quiz script like expert rating test on ODesk or Elance.

I want to track the time, means how much time have passed and left. I also want to stop the time counter, if the user internet connection is disconnected, so that he can start from where it was disconnected.

One last thing how to disable the last questions, which were attempted by the user. I am using PHP, MySql for it.

Your ideas will be great help for me.

Thanks in Advance

A: 

I've done something like this. Basically you have the right starting idea. Create a timer table which stores start times, test id and user id.

On each page load or AJax call you check the current timestamp minus the start time to see how long has gone since they started. If at any point it passes your limit you redirect them to the test complete page. Don't worry about the internet connection its actually irrelevant. This basic rule covers all.

Derek Organ
Thanks Derek Organ for pointing me in the right direction,One last thing is how I will disable, the last questions which were already attempted.Thanks
kakaajee
use javascript/ajax to redirect automatically when time is up.
Derek Organ