Issue Details (XML | Word | Printable)

Key: MDL-18395
Type: Sub-task Sub-task
Status: Open Open
Priority: Minor Minor
Assignee: Tim Hunt
Reporter: Tim Hunt
Votes: 0
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-15452

Change review 'Immediately after the attempt' to use session, rather than an arbitrary timeout

Created: 27/Feb/09 11:20 AM   Updated: 20/Mar/09 09:19 AM
Return to search
Component/s: Quiz
Affects Version/s: 2.0
Fix Version/s: 2.0

Issue Links:
Relates
 

Participants: Tim Hunt
Security Level: None
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
On submit all and finish, initialise

$SESSION->quizattemptjustfinished[$attemtp->id] = array('key' => random_string(10), 'time' => time());

and add

?key=$SESSION->quizattemptjustfinished[$attemtp->id]['key'];

to the URL of the review page. That marks that this is a review 'immediately after the attempt'. On each hit of the review page, update the 'time'.

Then on 'Finish review', delete that entry from quizattemptjustfinished.

When validating the key, if too much time has passed since the last recorded 'time', delete this entry from quizattemptjustfinished - that is necessary for when people just close the browser window.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Tim Hunt added a comment - 20/Mar/09 09:19 AM
Idea from Oleg, on the review page, send a small ajax request every minute to keep the review alive. That is what the OU wiki does with the editing lock, I think. Seems like a good idea to me.