• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Countdown timer

Kirk

Well-known member
#1
Hi all, So the one feature i'm trying to figure out for the quiz add-on is how would i go about developing a timer for the quiz. would it be done with the database?
 

Aayush

Well-known member
#2
Use PHP Sessions, to keep track of time and jQuery to make the counter. Just update the DB once the users proceeds to the next question.
You don't want to have the DB updating like every second by 100+ concurrent users.
 

Kirk

Well-known member
#3
Use PHP Sessions, to keep track of time and jQuery to make the counter. Just update the DB once the users proceeds to the next question.
You don't want to have the DB updating like every second by 100+ concurrent users.
Lets say i created a setting where admins can specify what time they want to set on the quiz they're creating in minutes. Is this still being doing with php sessions?
 

Aayush

Well-known member
#4
That should be done in DB, cause that persistant data.

If you are tracking the time it takes for a user to answer a question, then PHP session should be used and later it should be sent and added in the DB.