I am in the process of testing this in a fresh install to make sure this is moodle and not the theme or environment. In the quiz module once students have taken a quiz set with 2 or more attempts If I delete the first attempt or any other attempt other than the most recent, moodle does not recognize one attempt has been deleted and will not let students in. If I delete the most recent or all attempts moodle will see this and let students re-attempt the quiz. Is this how this is supposed to work?
Chad, this might be a bug alright - but could you please explain why you need to delete attempts?
This is for a client of ours, they probably need to delete attempts when or if their is an issue with internet connection, pop window confusion, or the student some how messes their attempts up. When I taught in the classroom I would have to reset student attempts every so ofen. I personally dont think allowing multiple attempts is the best pedegogy unless it being used in adaptive mode or for practice/review. But who am I to tell the client how to train....
This is effecting all my installations. In researching this more I found that the attempts are stored in mdl_data_attempts / attempts column as attempt 1 attempt 2 and so on. For each attempt a new column is written to the database and givin an attempt id. When you delete an attempt is deletes the whole column for the attempt ID. The problem is moodle gets the value from the attempt column in the database. So if you allow 8 attempts and delete all attempts accept the most recent when moodle fetches the attempt value it reads 2 and matches the attempt limit.
Wow! well done for finding that problem. I am actually surprised that no-one else has noticed it yet. Please can you report it in the Tracker.
Also, please note that Moodle 2.1 is due out at the end of this months, and contains a lot of changes in the quiz. If you are testing in order to plan an upgrade in a few month's time, you might be better testing Moodle 2.1 alpha. Anyway, I am pretty sure that this bug you have found will affect both versions.
I think this will affect all 2.0 versions, This issue does not affect 1.9. I submitted this this to tracker.
Yes. Thanks.
I see the code for this issue was fixed. The Summary of previous attempts pulls the attempt number from the database directly. So if you have two attempts and delete the first and the student retakes the quiz the attempt summary will show as attempts 2 - 3(see screenshot) This might be good as it will allow teachers to see students who have had their quizes reset so im not sure if this is an issue that needs to be reslolved.
I could see arguments both ways. Therefore I left it as it was. If people want to discuss this, and can reach some sort of consensus, I am happy to change how it numbers the attempts.
I agree I think this anomally will work well its probalby best left as it is unless I am missing something. Thanks for the fix brilliant work.