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

Restore does not respect some capabilities

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      • Create a course with start date today, shortname and fullname "CourseA"
      • Create another course with start date another day, shortname and fullname "CourseB"
      • Create a role that does not has the following capabilities:
        • moodle/course:changefullname
        • moodle/course:changeshortname
        • moodle/course:update
      • Assign this role to a user in both courses
      • Log in as this user
      • Create a backup of "CourseA" and restore on "CourseB" (deleting content and keeping content)
      • Make sure that in the process you cannot change the shortname, fullname, startdate and "overwrite course configurations" settings in this process (normally during the "schema" step of the restore).
      • Make sure that these fields are not changed after backup are restored
      • Make sure the same is valid for the "Import" process
      Show
      Create a course with start date today, shortname and fullname "CourseA" Create another course with start date another day, shortname and fullname "CourseB" Create a role that does not has the following capabilities: moodle/course:changefullname moodle/course:changeshortname moodle/course:update Assign this role to a user in both courses Log in as this user Create a backup of "CourseA" and restore on "CourseB" (deleting content and keeping content) Make sure that in the process you cannot change the shortname, fullname, startdate and "overwrite course configurations" settings in this process (normally during the "schema" step of the restore). Make sure that these fields are not changed after backup are restored Make sure the same is valid for the "Import" process
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull Master Branch:
      MDL-49545-master

      Description

      We currently have the moodle/course:changefullname and moodle/course:changeshortname capabilities set to prohibit for teachers. However, a teacher is able to change the course full and short names when restoring.

      Shouldn't these capabilities be checked during the restore process?

      Alternately, there could be an option to prevent overwriting the course configuration when restoring.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              danielneis Daniel Neis Araujo
              Reporter:
              adamann2 Ann Adamcik
              Peer reviewer:
              Ryan Wyllie Ryan Wyllie
              Integrator:
              David Monllaó David Monllaó
              Tester:
              Adrian Greeve Adrian Greeve
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/15