Login Register


Quiz Timer filter_list
Author
Message
RE: Quiz Timer #4
(07-16-2014, 12:38 PM)zomgwtfbbq Wrote: I don't really get it...how come the time stops when the user goes offline? That's a pretty nice feature actually. Biggrin

Anyway, just save the unix timestamp when the user starts and go from there. Personally I'd go for an ajax based quiz that would keep the quiz on your screen without reloading after each question was answered. After each answer you can send back some json data to load the next question or finish the quiz. You can eg use setInterval each second to check whether the time is already over. The advantage is that the user will be shown in realtime that the time is over and it's pretty much impossible to cheat. The only disadvantage would be that you send a request every x seconds to the server. But it will look much slicker.

I meant the timer resets Tongue Well I'll see what I can do about this
My Blog: http://www.procurity.wordpress.com
Donations: 1HLjiSbnWMpeQU46eUVCrYdbkrtduX7snG

Reply





Messages In This Thread
Quiz Timer - by Ex094 - 07-16-2014, 09:59 AM



Users browsing this thread: 1 Guest(s)