when restore the course, the following error is come.
- Checking user data
Here's a long discussion on this issue. Please read the whole thing, as there is conflicting advice. http://moodle.org/mod/forum/discuss.php?d=142720
For my Bitnami Moodle Stack (localhost), I changed the admin and one other identical username before restoring the course. It worked for me, although I'm still unclear which admin accesses MyPHP, etc.
Open the backup zip file and then edit the moodle.xml file. Look for Admin and delete if anything in it. From memory, there may be more than just one instance of it in the file, so just keep looking until there is nowhere else to look.
and a bit more as well. DO NOT delete the tags, just username, first-lastnames email There is a bit more data and so on, but another way is to go do another backup and do not accept user files, user data, roles user files and so on. Just backup the course files, nothing else. Good luck...
This is very useful.
Just to be sure, the modified part of the file should look like this:
Am I right?
Hi Glenys, not really, I rushed it in writing this, was going out last night.. that is only part of it, on mine it starts:
this contains all the user ID of all users associated with the course.The ID number is not that important, but as I have four admins on my production site this is the first and I have had success at removing this one and getting the restore to work. I have just deleted the data as you have shown, which includes contact details and times accessed and everything else relating to this id. It goes all the way to the next user, and includes user preferences:
</USER> //the next user then starts...
As an alternate:
Find and replace the string in the XML file
<USERINFO>false</USERINFO> //and there will be a few of them...
And delete ALL user information, from <USERS> to </USERS>but while I am confident this would work, I have never really tried it. You may also have to make sure that User data files are exluded too. (I only ever make one backup with all User files, that is the end of course just before I reset so never tried this. Scheduled backups take care of the other issues, this is the one for my own records.) However, it seems a logical extension.
The last bit I did not mention was that after editing, rezip it, upload and test by restoring it.
While a very useful tool, Moodle limitations will always get in the way. I have often found that User data, Roles and blocks and other bits and pieces will sometimes stop a restore when taking it from one production site to another, or from my work site to my private Moodle. (Funnily enough, it has never caused a problem the other way, and I am not sure why that is.) I got into the habit quite quickly of just not including user files or user data in backups. For blocks and other mods, I just delete the offending block, usually non-core blocks or resource types, other plugins, nanogong causes an issue from time to time, from the XML backup - everything from <MOD></MOD>. I have time to do it, as a chronic insomniac, but others don't and it can often be a long and boring process.
Thanks for the extra info. I'll try it out (on a copy) of one of my courses and let you know how I get on.
I have so many courses I can't restore that it's really frustrating. I want the user info (it's the students that write the interesting things, not me).