Page 1 of 1

Complex Quiz Game

Posted: Mon Oct 06, 2008 3:58 am
by andrei.mita
Planning to make a rather complex quiz that minimizes cheating. It will look like this:
30 questions
10 seconds / question answering time
5 seconds comment after answer

I want to make it with the help of PHP and AJAX. Does anyone has a suggestion for an algorithm to make this work?

My main problems are cheating through JavaScript injections and the accuracy of the time / question.

Re: Complex Quiz Game

Posted: Mon Oct 06, 2008 8:25 am
by Paul Arnold
Could you not insert the microtime into the database at the start of the script and the time when the page is submitted and compare the two?

Re: Complex Quiz Game

Posted: Mon Oct 06, 2008 8:40 am
by andrei.mita
This would measure the time one took to answer, correct? I need to limit the time in which the answer is given to 10 seconds, not to record it. Should setTimeout from an ajax script be enough? Are there any quiz algorithms that I could study?

Re: Complex Quiz Game

Posted: Mon Oct 06, 2008 9:22 am
by Paul Arnold
Yeah, I'm just thinking if you wanted to validate the time answers are given in on the server side rather than just at the client side (although if your application is just a bit of fun I'm not sure you'd really need to be that stringent).

Re: Complex Quiz Game

Posted: Mon Oct 06, 2008 9:28 am
by andrei.mita
I need to restrict and auto submit, not validate and the quiz it's not for fun, it is a serious project. Thanks.