Restoring students quiz attempts not working

Restoring students quiz attempts not working

by MC Otake -
Number of replies: 13

Average of ratings: -
In reply to MC Otake

Re: Restoring students quiz attempts not working

by Jean-Michel Védrine -
See bug 3159
Unfortunately to my best knowledge it is still open both in 1.5x and in 1.6dev branchs.
But I seem to remember it was possible to comment the 2 lines:
notify("Restoring quiz without user attempts. Restoring of user attempts will be implemented in Moodle 1.5.1");
return true;
in the mod/quiz/restorelib.php file and have the actual state of the code wich is working for a lot of question types (but maybe not for random questions, rqp questions and some others, I'm not sure, maybe problems have been fixed since june)
If you are only using multiple choice, true/false, ... and are in a hurry to retore your users attempts maybe you can try this on a test Moodle install (not on your production server, not to corrupt your database) and see if it restore all your users attempts.
In any case it would be wise to wait for Gustav or Julian comments on this issue before doing anything sourire


In reply to Jean-Michel Védrine

Re: Restoring students quiz attempts not working

by MC Otake -
Thanks. I'll give it a try. approve
In reply to Jean-Michel Védrine

Re: Restoring students quiz attempts not working

by Donnie Carpenter -
Can anyone provide an update on this bug/problem (#3159).... I can't believe that it is still outstanding?  
In reply to MC Otake

Re: Restoring students quiz attempts not working

by Nick Whitt -
I got this message, too. I am very tempted to comment the code out and test it on development, just to see what happens. I saw Julian's last comment was a week ago on bug 3159; anyone know if there is a fix coming soon?

~Nick
In reply to MC Otake

Re: Restoring students quiz attempts not working

by Julian Sedding -
I have implemented this functionality now. I don't have much data to test it with, but it worked fine for my small set of data.

The updated version of restorelib.php is attached to this post. Could people who know what they're doing please copy the file to a test installation, test the restore functionality with some real data and report any failures (or even success smile )? When it seems stable enough I will then commit the modifications to CVS.

Julian
In reply to Julian Sedding

Re: Restoring students quiz attempts not working

by MC Otake -
Thanks. I´ll check it out and let you know what happened with my info. I have about 60 quizzes. approve
In reply to MC Otake

Re: Restoring students quiz attempts not working

by Donnie Carpenter -
MC, Any restults to post.. I got an error using the attached Restorelib above.
In reply to MC Otake

Re: Restoring students quiz attempts not working

by Donnie Carpenter -
Any results to report?  Is this an open bug?
In reply to Donnie Carpenter

Re: Restoring students quiz attempts not working

by MC Otake -
Not yet. I've got an error, too. I'll try again and let you know.
In reply to MC Otake

Re: Restoring students quiz attempts not working

by Donnie Carpenter -
Had a chance to try again yet?
In reply to Donnie Carpenter

Re: Restoring students quiz attempts not working

by MC Otake -

Yes, but I'm getting some errors. I'll try again and paste a copy of the errors so you can check them out. I'm not sure if they have anything to do with the script.

In reply to Donnie Carpenter

Re: Restoring students quiz attempts not working

by MC Otake -

I'm sorry for taking ions to answer. I've had some problems with the backup and restore process. But I've tried restoring only the quizzes without any other information and the 30 quizzes I had with more than 2500 items and more than 500 student attempts for only one course worked as a charm. I´ll try with the rest of my courses, but I strongly believe I won't have any problems.

Thanks for sharing your php file. It was what I needed.

smile smile smile smile smile