Is there a way to turn off the feature that allows users to continue quiz they started earlier?
Because now if an unregistered user A starts a quiz and after that, when user A is still there an unregistered user B enters and he starts the quiz not from the beginning, but from the point where user A stopped.

Comments

Froghead’s picture

I have the same problem, i need to turn off resuming but have no idea how.. I tried to edit the .module, destroyed sessions, manipulated variables but had no success.

jeffschuler’s picture

This looks like it might be a duplicate of #572894: Anonymous Users start from the same point, but the post here doesn't really address at what point user A's session should end and be cleared.

We probably always want to maintain the quiz state if user A should refresh the page, leave the page and return, or close and re-open the browser, (as it currently works.)

Maybe as #304268: Anonymous Users and Cookies suggests, a configurable session expiry would help.
@iklio, would the jQuery Countdown integration that Quiz provides meet your needs?

What about just destroying a session manually, as @Froghead seems to be requesting? -- A simple "Restart Quiz" button?

hiddentao’s picture

I need this too. I'll post up a patch which allows you to configure via Quiz admin. I'm going to assume that most people will want one global setting which covers all quizzes as this fits my requirements and is simpler to implement than a per-quiz setting.

hiddentao’s picture

StatusFileSize
new3.55 KB
new3.55 KB

Looks like it was easy to make the 'Allow Resume' feature configurable on a per-quiz basis. Please see attached patch, tested against Quiz 6.x-4.0-rc9.

After applying the patch remember to run update.php as it does add new database fields.

Then goto /admin/quiz/settings/quiz_form and you will see Allow Resume under Taking options. By default it is turned on, which matches the current Quiz behaviour. This setting can be overridden for individual quiz nodes through their edit forms.

falcon’s picture

Version: 6.x-3.0 » 6.x-4.0-rc9
Status: Active » Needs review

Looks good! I will commit it soon. I'm working on a hook_update_N myself right now so I have to wait until my own changes are commited first.

falcon’s picture

Status: Needs review » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

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

fgm’s picture

Status: Closed (fixed) » Active

I think having this be common to logged-in and anonymous users is not optimal: resuming makes (some) sense for logged-in users, but not for anonymous ones: it is apparently the underlying cause for #572894: Anonymous Users start from the same point, but turning it off on a per-quiz basis as this update does means logged-in users lose that feature too.

If allow_resume is maintained for anonymous users (need it really be ?), it would be better to have three choices: no resume, resume for logged-in only, resume even for anonymous.

djdevin’s picture

Component: Code » Code - Quiz core
Issue summary: View changes
Status: Active » Closed (outdated)

This issue is being closed because it is filed against a version that is no longer supported.

fgm’s picture

Is this addressed or no longer relevant in current versions ? Because the underlying functional issue still exists : if it is still relevant, it would be better to bump it than close it. Your call.