by Susan Fleming.
Hello
Some back ground, last summer we switch all our users over to student numbers from personally selected usernames and since then we have been running into problems when we attempt to restore courses with user data due to conflicts.
I thought I would share the solution we came up with
- Make a copy of course backup file, so you have the original if needed
- Change extension to .zip
- DON’T unzip
- Locate .xml file to be modified - users.xml when restoring courses returning this error (see example above):
- Trying to restore user '357xyz' from backup file will cause conflict
- Trying to restore user 'abc246' from backup file will cause conflict
Search each individual conflict error in the .xml fileIn Moodle > System Admin > Users > Accounts > Browse List of Users > Show More… > Search Surname if possible, alternately search Username – should come up with 2 records for the same userClose eye on record with larger last active period (1 year 84 days)Copy Username from most recently active record (285 days) into the Word document to replace the conflicting usernameOnce all changes are made > Select-All > Copy > Paste into the Notepad to replace existing html codeSave - don't use Save As
Find saved file in File ManagerCopy filePaste to back up file with the .zip extension; when prompted, select Copy and ReplaceChange the file extension back to .mbz Restore update .mbz course into MoodleRelabel the modified course if desired and copy into appropriate backup folder