Re submit problem in quiz

Re submit problem in quiz

by Sudip Das -
Number of replies: 2

In quiz section give answer to question and then click “submit All and finish”. Then click on back button of browser. It will show question again and then click “submit All and finish”. It qill take another entry in database. Go to report section . In time taken column it will show “now”. Why it is showing now? How I can restrict user by doing the same?

(Edited by Tim Hunt to remove junk from Word copy-and-paste - original submission Monday, 19 July 2010, 11:57 AM)

Average of ratings: -
In reply to Sudip Das

Re: Re submit problem in quiz

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
There is a logical explanation for what you are seeing, although arguably it is a bug.

1. When the student clicks “submit All and finish” for the second time, there is not a currently open quiz attempt, so a new one is started.

2. Then, the student has clicked submit and finish, so this new attempt is immediately closed.

3. The code that displays time intervals (like 1 days 7 hours) is written on the assumption that it is displaying an amount of time in the past, so it displays 0 as 'Now', which is annoying here.

To change the 'Now' behaviour, you would need to change the format_time function at around line 1150 of lib/moodlelib.php.

There won't be a fix for the underlying issue until Development:Question_Engine_2 is done.
In reply to Tim Hunt

Re: Re submit problem in quiz

by Greg Kraus -
The problem seems to only affect multiple attempt quizzes. Giving the quiz in a secure window seems to fix the problem.