HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[v5.0.1.] - Survey (Quiz) Timelimit doesn´t work correct

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#62631 (In Topic #13604)
Avatar

Fan in training

Hello Dears,

Found nothing on the Forums or in the Bug tracker so I decided to post it here.

We´re running a survey in ocportal with a 45 minutes timelimit. When i do the survey and post my answers, lets say 2 minutes after starting the survey, submitting works. If I submit my answers after 10, 25 or even 44 minutes oc portal says the "you needed to long to answer the questions" and nothing is submitted and the user cant finish. The timer shows enough time left before submitting. It also displayed an error stack:

version: 5.0.1, PHP version: 5.1.6, URL: /portal/site/index.php?page=quiz&keep_fatalistic=1&type=_do&id=3&keep_cedi_root=23)

Here is the stack trace:

Below is a stack trace revealing the state the software was in when the error occurred. If this represents a bug in the unmodified software, you may want to check ocPortal website for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, what you tried to do, how you tried to do it, version numbers, and any other appropriate information.
We apologise for this problem and if it's a bug we hope you will work with us so that we can fix it for you promptly.

File'/u01/appl/www/portal2010/portal/sources/failure.php'
Line'592'
Function'get_html_trace'
Args

File'/u01/appl/www/portal2010/portal/sources/global2.php'
Line'893'
Function'_fatal_exit'
Argsobject


File'/u01/appl/www/portal2010/portal/sources/failure.php'
Line'179'
Function'fatal_exit'
Argsobject


File'/u01/appl/www/portal2010/portal/sources/global2.php'
Line'853'
Function'_generic_exit'
Argsobject

'WARN_SCREEN'


File'/u01/appl/www/portal2010/portal/site/pages/modules/quiz.php'
Line'455'
Function'warn_exit'
Argsobject


File'/u01/appl/www/portal2010/portal/site/pages/modules/quiz.php'
Line'250'
Function'_do_quiz'
Class'Module_quiz'
ObjectModule_quiz::__set_state(array( ))
Type'->'
Args

File'/u01/appl/www/portal2010/portal/sources/zones.php'
Line'336'
Function'run'
Class'Module_quiz'
ObjectModule_quiz::__set_state(array( ))
Type'->'
Args

File'/u01/appl/www/portal2010/portal/sources/site.php'
Line'962'
Function'load_module_page'
Args'site/pages/modules/quiz.php'

'quiz'


File'/u01/appl/www/portal2010/portal/sources/site.php'
Line'745'
Function'request_page'
Args'quiz'

true


File'/u01/appl/www/portal2010/portal/site/index.php'
Line'51'
Function'do_site'
Args

Anyone experienced the same issue or can help ?

br

Thomas

Back to the top
 
Posted
Rating:
#62632
Avatar

Fan in training

** update **

I just killed the timelimit from the survey completely (means i left the field blank), added a new user, logged in and did the survey. I submitted my answers after 43 Minutes and it said the "too long" error. Checked twice, there is nowhere a time limit. Am I missing something ?
Back to the top
 
Posted
Rating:
#62633
Avatar

Hmm, I'm not sure what would cause that, and I've looked over the code very carefully. The only guess I can make is if you're not on the mysql database driver and the database driver you have has a bug where it's not returning NULL from database records correctly. Could that be the case?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62770
Avatar

Fan in training

Gd morning Chris,

First of all thank you for your quick reply, since I am not a pro with Databases an Code I just did some tests.

- I created a new Survey with the same settings and questions as the buggy one and the new one works just fine.
- I created a new survey with timelimit 2 minutes, changed it after creation to 10 minutes, and i got the same probs i described. I can only post my answers the first 2 minutes, after that i got this error, even after removing the timelimit by leaving the field blank.

So I guess it has to do with changing the values of a existing quiz / survey.

br

Thomas
Back to the top
 
Posted
Rating:
#62777
Avatar

Could it just be that the frontend (client-side, HTML/CSS) doesn't know if the backend is reconfigured?
That would cause two things if the frontend was open for a user whilst the backend is changed:
  1. If the limit is lengthened, Javascript would not know and give an error too early.
  2. If the limit is shortened, Javascript would not know and give no error when it should have - but a server-side error would be given when submitting.

I will document that.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62790
Avatar

Fan in training

Guess no, tested it on 2 different clients (1x Laptop and 1x Desktop) and i even tried it with creating new "testusers" to verify its not userbased.

So it assume it´s server based.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: