Support Forums

ATutor Bug Reports

take_test_q.php no questions found issue


You must be signed-in to post.

AuthorSubject
  Page: 1
mwarner
Subject: take_test_q.php no questions found issueQuote this post in your reply
ATutor 1.6.1

Issue: A user takes a test that is one question per page, gets to the last question, clicks previous to review their answers, then leaves the test. The user comes back to the test and gets a no_questions error when they click to begin the test.

Symptoms: The final question answer choice is stored, so the student has answered all of the questions, but the test is not marked as complete. When the student returns, $pos==$num_questions, throwing a no_questions error because the the LIMIT in the query starts at the number of questions in the test.

File affected: /tools/take_test_q.php

Suggested fix: if $pos==$num_questions, decrement $pos by one before the line with "this is a kludge to get the question number incremented." (That is around line 200.)

In the same file, I suggest a check to see if the question being viewed is the final question ($pos==$num_questions-1) and, if so, change the Next button to read Submit to reduce confusion and to keep it consistent with the single-page test buttons. This is around line 240.

Granted, that first item is a one-in-a-million thing, but it happened today.

Thanks,
Mike
Posted: 2010-12-03 21:11:46
cindy

Avatar for cindy
Subject: Re: take_test_q.php no questions found issueQuote this post in your reply
This issue has been added into bug tracker. Thanks.
Posted: 2010-12-03 21:29:21
cindy

Avatar for cindy
Subject: Re: take_test_q.php no questions found issueQuote this post in your reply
The issue has been fixed in the recent ATutor versions. You may consider to upgrade ATutor to obtain the fix and new features.
Posted: 2010-12-08 19:41:26
muso
Subject: Re: take_test_q.php no questions found issueQuote this post in your reply
I've got the same issue ("No questions found." message), but this time it's due to questions being added after the test has been started.

i.e. I trialled the test; added three questions to the start of the quiz, and started again and it showed a couple of the questions (not the new ones) and then showed the no questions message. I'm not sure what I need to do to reset the test for this user as I guess it may be related to the information stored about the test. I have got it set to unlimited attempts, so it should allow the user to go through all of the questions again, but it doesn't seem to be.

I'm using the latest patched version too, although the latest patch says:
"Fixed the issue that after enrolling into a private course, the first click on any tab links re-directs to the user index page instead of the tab page itself." - 2010-12-07 15:32:36
Posted: 2010-12-15 09:37:51
greg

Avatar for greg
Subject: Re: take_test_q.php no questions found issueQuote this post in your reply
I had no luck reproducing the problem on my local development system, or on the atutor.ca demo site.

Are you able to reproduce the problem on the demo site?

In reply to:
I've got the same issue ("No questions found." message), but this time it's due to questions being added after the test has been started.

Posted: 2010-12-15 14:13:01
muso
Subject: Re: take_test_q.php no questions found issueQuote this post in your reply
Thanks for the reply.

Unfortunately I don't have time to try to replicate it. What fixed it for me was to create a new test/survey and add all the questions into it, and it worked as normal again (the original survey with the same questions - albeit originally changed from a different set of questions, still wasn't working).

I suspect it was something connected with the state of the user's progress through the test, and linked with questions that no longer were assigned to that course (I had deleted some questions, and added others).
Posted: 2010-12-16 12:33:44
jessica4u
Subject: helloQuote this post in your reply
spammer
mimanwfor2@yahoo.com
Posted: 2012-07-28 05:18:26
 Page: 1

You must be signed-in to post.