Complex Quiz Game

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
andrei.mita
Forum Commoner
Posts: 65
Joined: Sun May 08, 2005 4:06 am
Location: Barlad/Romania

Complex Quiz Game

Post 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.
Paul Arnold
Forum Contributor
Posts: 141
Joined: Fri Jun 13, 2008 10:09 am
Location: Newcastle Upon Tyne

Re: Complex Quiz Game

Post 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?
andrei.mita
Forum Commoner
Posts: 65
Joined: Sun May 08, 2005 4:06 am
Location: Barlad/Romania

Re: Complex Quiz Game

Post 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?
Paul Arnold
Forum Contributor
Posts: 141
Joined: Fri Jun 13, 2008 10:09 am
Location: Newcastle Upon Tyne

Re: Complex Quiz Game

Post 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).
andrei.mita
Forum Commoner
Posts: 65
Joined: Sun May 08, 2005 4:06 am
Location: Barlad/Romania

Re: Complex Quiz Game

Post 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.
Post Reply