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:
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
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");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)
return true;
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
Thanks. I'll give it a try.
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?
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
~Nick
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 )? When it seems stable enough I will then commit the modifications to CVS.
Julian
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 )? When it seems stable enough I will then commit the modifications to CVS.
Julian
Thanks. I´ll check it out and let you know what happened with my info. I have about 60 quizzes.
MC, Any restults to post.. I got an error using the attached Restorelib above.
Any results to report? Is this an open bug?
Not yet. I've got an error, too. I'll try again and let you know.
Had a chance to try again yet?
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.
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.
Take a look at:
http://moodle.org/bugs/bug.php?op=show&bugid=5482
http://moodle.org/bugs/bug.php?op=show&bugid=5482