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

If a course has blocks which have had Guest and/or Authenticated user roles removed, when backed up and restored, the new course retains those removed roles

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.8.6, 3.8
    • Fix Version/s: None
    • Component/s: Backup, Roles / Access
    • Labels:
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_38_STABLE

      Description

      Take a course and modify the permissions of a block within that course, removing the Authenticated user and/or Guest roles from the block. Backup and restore the course. In the restored course, the block which was modified in the original course now has the Authenticated user and/or Guest roles added back.

      To replicate, as an administrator perform the following steps:

      1. Create a course; turn editing on
      2. Add a block to the course (HTML block is a good example)
      3. Click "Assign roles in block"
      4. In the block's Administration block, click "Permissions"
      5. For "View block" remove either (or both) Guest and/or Authenticated user roles.
      6. Backup the course without users; all other backup settings take the default
      7. Restore this backup to a new course; take all defaults
      8. During the restore, on the "6. Process" page, depending on which role(s) were removed in step 5 above, you'll receive the message that "The [role] in the backup file cannot be mapped to any of the roles that you are allowed to assign." You'll also get a "Restore role mappings dialog". The "Guest" and/or "Authenticated user" roles have default roles of "None" for mappings.
      9. Click Continue
      10. Navigate to the restored block for which you altered the role permissions in step 5 above. Note that the removed role(s) have been added to the block.

      The expected behavior is that whatever roles were removed from a block in an original course should not appear in the restored course.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                michael.robinette Mike Robinette
                Participants:
                Component watchers:
                Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: