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

    • 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

              Unassigned Unassigned
              michael.robinette Mike Robinette
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.