Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-21912

Impossible to restore a course : Trying to restore user 'admin' from backup file will cause conflict

    XMLWordPrintable

    Details

    • Database:
      MySQL
    • Testing Instructions:
      Hide
      1. Restore the attached backup file in your testing environment. Verify the process ends with the "Trying to restore user 'admin' from backup file will cause conflict" message.
      2. Go to "Site administration" > "Courses" > "Backups" > "General import defaults" and turn on "Allow duplicate admin restore".
      3. Restore the attached course, the process should end without error.
      4. Go to the restored course. The "admin" user of the target site will:
        1. Be enrolled in the course as teacher.
        2. Have a forum post in the "News forum"
        3. Have a glossary entry in the "A glossary, by an admin" glossary.
      5. Navigate to admin/user.php and verify you see "Admin User" with email "willconflictforsure@MDL-21912.com"
      6. Edit their profile and ensure the username is admin_582fbec0c5feb0bb76506a786614036d
      7. Repeat the course restore (with the same backup file) and verify there are no errors during the restore
      8. Go to the list of users again and make sure there are no new admin users
      9. Go to the restored course (called "MDL-21912 Conflicting admin copy 1") and check all the same stuff as before
      10. On a clean install, try restoring the course with a user who does not have permission to create users (ensuring that the "Allow duplicate admin restore" setting is on). Ensure it does not allow you to do so.

      Bonus
      Trigger a site upgrade and check that you see the new "Allow duplicate admin restore" setting, and that is is unchecked by default.

      Show
      Restore the attached backup file in your testing environment. Verify the process ends with the "Trying to restore user 'admin' from backup file will cause conflict" message. Go to "Site administration" > "Courses" > "Backups" > "General import defaults" and turn on "Allow duplicate admin restore". Restore the attached course, the process should end without error. Go to the restored course. The "admin" user of the target site will: Be enrolled in the course as teacher. Have a forum post in the "News forum" Have a glossary entry in the "A glossary, by an admin" glossary. Navigate to admin/user.php and verify you see "Admin User" with email "willconflictforsure@ MDL-21912 .com" Edit their profile and ensure the username is admin_582fbec0c5feb0bb76506a786614036d Repeat the course restore (with the same backup file) and verify there are no errors during the restore Go to the list of users again and make sure there are no new admin users Go to the restored course (called " MDL-21912 Conflicting admin copy 1") and check all the same stuff as before On a clean install, try restoring the course with a user who does not have permission to create users (ensuring that the "Allow duplicate admin restore" setting is on). Ensure it does not allow you to do so. Bonus Trigger a site upgrade and check that you see the new "Allow duplicate admin restore" setting, and that is is unchecked by default.
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Pull Master Branch:
      MDL-21912-master
    • Sprint:
      3.1 Stable Sprint 1, 3.1 Stable Sprint 2
    • Issue size:
      Large

      Description

      I'm currently importing all courses from a Moodle installation to new installation, on the same server, the old one , doesn't play scorms, composite resources (web pages) stored in the Moodle file directory and no problem with the new installation.I didn't found why , instead to loose time searching the cause, I preferred importing all the content to the working installation ...

      But some times, some courses cannot be restored, the procedure blocks with this message :

      Some problems were detected when checking user data (Trying to restore user 'admin' from backup file will cause conflict)

      An error has occurred and the restore could not be completed!
      I tried making backups removing the admin role (if present ) in the course but the problem still here.
      I followed the following post http://moodle.org/mod/forum/discuss.php?d=142720, but this doesn't give me a solution. I followed the Helen's suggestion and reporting here my problem.

      Vincent

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                13 Vote for this issue
                Watchers:
                26 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Mar/16