I'm having some problems with the quiz module for anonymous users. When one anonymous visitor starts a quiz and then abandons it part way through, the next anonymous user doesn't start from question 1, but from the last question of the previous anonymous user. I'm trying to across browsers, and with different IPs, but no matter what I do, any non-logged in user that goes to the quiz is essentially seen as the same person by the system, and starts where the last visitor left off. It's like the session never ends, or doesn't recognize unique individuals.

Am I missing something here, or is this a bug?

CommentFileSizeAuthor
#5 quiz-572894-01.patch634 bytesmbutcher
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mbutcher’s picture

This would definitely be a bug. Probably one introduced as a fix to another bug. Anonymous users should not be able to continue quizzes when they stop.

petethedude’s picture

Is there any way to disable resuming entirely? I'm trying to figure out if I can just comment something out, but I'm not getting anywhere with it.

mbutcher’s picture

I just patched the Quiz 3 dev branch to prevent anonymous users from resuming quizzes. Please grab the daily snapshot for 2009-09-11 and see if that fixes the problem.

If it completely fixes the problem for you, please let me know so that I can make sure Quiz 4 also has this patch.

Matt

petethedude’s picture

Thanks for giving it an effort, Matt. Unfortunately, it didn't seem to fix my issue. Rather than resuming the quiz, the module now spits out "Question Results" for anonoymous users, rather than resuming into the quiz. It's definitely still remembering the result from previous users, but not allowing continue the quiz instead.

Can you it be a problem with the way sessions are configured/handled on my system? We're running IIS 6.0 with ISAPI Rewrite 3 for Clean URLs.

mbutcher’s picture

FileSize
634 bytes

It is possible that the issue is caused by IIS, though not likely.

There was one other minor place in the code that might be causing the issue. I've patched that too (patch attached for reference).

Please try today's snapshot (2009-09-14) and see if that fixes it.

petethedude’s picture

Perfect! That patch did it. Thanks so much for your efforts.

Lakeside’s picture

Quiz module installed: 6.x-3.x-dev (Drupal site reports Sept. 15, but when installed it reports Sept. 14)

I'm having the same problem with anonymous users coming to the site after another user has abandoned a quiz. The new anonymous user starts where the previous user left off.

Verified that the patch to check for anonymous user is present.

Seems like it should work.

mbutcher’s picture

Can you give me some more details? # of questions on the quiz, number of users, modules installed, Web server/PHP version/mySQL version and so on?

Thanks,

Matt

Lakeside’s picture

1) There are 25 questions. (All are images--both question and answer.) http://www.makeyourpredictions.com

2) The only user (other than admin) is anonymous. If you are asking how many use it at simultaneous basically none.

3) Modules installed.
a) autoload 6.x-1.3
b) calendar 6.x.2.2
c) cck 6.x.2.5
d) image 6.x-1.0-beta3
e) img_assist 6.x02.0-alpha4
f) mollom 6.x-1.1.0
g) node_limit 6.x.0.3
h) twitter 6.x-2.6
i) views 6.x-2.6
j) taxonomycloud 6.x-2.3
k) date 6.x.2.4
l) views_slideshow
m) quiz 6.x-3.x-dev

4) Linux (Bluehost), Apache 2.2.13 (Unix)

5) PHP version 5.2.9

6) MySQL 5.0.81

Hope that helps.

WhenInRome’s picture

This bug is still present in the latest 4.x-dev too.

webismymind’s picture

Hello!
I'm having the same problem, even with the patch Matt posted last week.
Is there any news on this issue ?
Like technoholic asked before, i was wondering if there were any way to disable resuming entirely ?

Thank you !

webismymind’s picture

yep! I have the problem on the demo site : http://sivaji.ubuntu-tam.org/quiz-demo/Demo
As an anonymous user, i start with question 2 on 5 ... any clue ?

Lakeside’s picture

Appears to be fixed in the Sept. 30 Dev version.

Everything works great. Thanks Matt.

Froghead’s picture

Category: bug » feature

Is there still no solution for turning off resume feature?
A button like "Turning off resuming" or something would be GREAT ;-)

Thanks in advance..

mckooter’s picture

yeah, possibly a permission that can be flagged of for each usertype? that way you can allow members to resume but make sure it dosent for guests,

i havent fully tested it yet but i will be having many guests taking the quiz's at the same time, and will need to be able to record keep them seperately. not sure if there is any issues with that as of yet, i havent had several computers from different isps to test it yet

4kant’s picture

I have the same issue with anonymous users starting with the question number of the last user (if he didn´t finish the quiz).
Quiz version 6.x-3.3, Drupal 6.14

Tried latest dev- version (Okt 22).
Still the same - AND: Now user-1 starts at the same point too :-((

Any solutions?

Thanks

Sivaji_Ganesh_Jojodae’s picture

Version: 6.x-3.3 » 6.x-4.x-dev
Category: feature » bug
Priority: Normal » Critical

I think it is a bug which needs more attention. I Will try to fix it for 4.x and backport the same to 3.x.

4kant’s picture

Version: 6.x-4.x-dev » 6.x-3.3
Category: bug » feature
Priority: Critical » Normal

Correction!

I cleared all browsers chaches and tested again.

Now I have 6.x-3.3 (not dev) and the patch from #5.
Everything seems to work.
Thanks!

SophieG’s picture

Version: 6.x-3.3 » 6.x-4.0-rc8

Please i still have this issue !!

yogeshchaugule8’s picture

I was having same problem for anonymous user. And I solved it like this

I have added these lines of code in my hook_init function of quiz module

    if ((arg(1) != 'xxx' && arg(2) != 'take')) {
      unset($_SESSION['quiz_xxx']);
      $_SESSION['quiz_xxx']['quiz_vid'] = array();
    }

where 'xxx' is my quiz nid of which I want to empty the session.

for eg. if my quiz nid is 10,

    if ((arg(1) != '10' && arg(2) != 'take')) {
      unset($_SESSION['quiz_10']);
      $_SESSION['quiz_10']['quiz_vid'] = array();
    }

If I am not adding '$_SESSION['quiz_xxx']['quiz_vid'] = array();' then it will not work (I have wasted 4 hrs on it, trying without this line).

This will unset the session variable if the viewing page is not of type quiz, and anonymous user will be able to start quiz from starting.

I dont know whether this will work perfectly in the case of login user, on our site we dont have login user, every user is anonymous user (except admin).

Regards,
Yogesh

Blisstering Solutions
yogesh.chaugule@blisstering.com

yogeshchaugule8’s picture

If this also doesn't work then with this changes also disable page cache.

lor’s picture

Version: 6.x-4.0-rc8 » 6.x-4.0

Same problem for me. Even with disabling all caches, anonymous users can't pass the first question.
I've updated quiz from 3.5 to 4 and the problem persists.
Any idea?

Thanx for your help.

falcon’s picture

Check your user table in the database. If user 0 is missing you'll have to recreate user with uid 0.

lor’s picture

Bingo!

Thanks a lot for your answer!

Gratefully,

loR

issa.haddadin’s picture

Version: 6.x-4.0 » 7.x-4.0-beta1
Component: Code - Quiz module » Code - Import/Export
Category: feature » bug

Same problem here!

issa.haddadin’s picture

Component: Code - Import/Export » Code - Quiz core
falcon’s picture

Issue summary: View changes
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.