Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

getting error in quizx plugin please help

+1 vote
118 views
asked Dec 13, 2017 in Plugins by muzamil

Hello everyone

i hope you all are doing well 

i need your help in quiz plugin which is showing an error of time to me,

whenever i go to my score page i got the following error, i have tested carefully & attempted two questions on different time but time is only showing 1 second ago in all quiz question attempted. after 10 minutes it still shows 1 second ago. 

Dear Kai  i need your help because you are the developer.

thanks

 

commented Dec 14, 2017 by muzamil
please help me out
commented Dec 14, 2017 by muzamil
Please Kai help me out
commented Dec 15, 2017 by muzamil
Is there anybody to help me.

1 Answer

+1 vote
answered Dec 14, 2017 by q2apro
Check your database:

1. "db_time" in qa_options

2. "timestamp" in table quizx_gameplay

From both the time ago is calculated.

See quizx-page-userstats.php lines:

$qtime = qa_opt('db_time')-strtotime($row['timestamp']);

$qcreated = qa_lang_html_sub('main/x_ago', qa_html(qa_time_to_string($qtime)));
commented Dec 21, 2017 by muzamil
it will be better if you send me a fresh copy of this plugin to this email address  

sajan12it13@yahoo.com
commented Jan 28 by q2apro
I am pretty sure now that this is a timezone issue. Can you set date_default_timezone_set('Europe/Berlin'); (take your right timezone: http://php.net/manual/en/timezones.php ) as a line into the script?
...