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

Wrong context level for capability moodle/course:viewsuspendedusers

    XMLWordPrintable

Details

    • MOODLE_37_STABLE
    • MOODLE_37_STABLE
    • MDL-67073-master
    • Hide

      Make sure core upgrade script ran for you, for ease of rebasing the version bump was not included in this branch

      1. Create a course
      2. Enrol a user as a student and suspend them
      3. Enrol another user as a teacher
      4. Login as a teacher and go to course participants
      5. You should see the suspended student
      6. Login as an admin, go to the course, from the edit menu select "More...", then "Users" and then "Permissions" (the section name link)
      7. Search for moodle/course:viewsuspendedusers and remove it from "Teacher" role (Before this patch it was not possible)
      8. Login as a teacher
      9. Make sure you can not see suspended users in the participants list
      Show
      Make sure core upgrade script ran for you, for ease of rebasing the version bump was not included in this branch Create a course Enrol a user as a student and suspend them Enrol another user as a teacher Login as a teacher and go to course participants You should see the suspended student Login as an admin, go to the course, from the edit menu select "More...", then "Users" and then "Permissions" (the section name link) Search for moodle/course:viewsuspendedusers and remove it from "Teacher" role (Before this patch it was not possible) Login as a teacher Make sure you can not see suspended users in the participants list

    Description

      capability moodle/course:viewsuspendedusers has context_system when it is something that can be granted in the course

      This capability can still be added to the roles that are assignable in the course context (such as editingteacher), however it can not be overridden because of the wrong definition

      Attachments

        Activity

          People

            marina Marina Glancy
            marina Marina Glancy
            Daniel Neis Araujo Daniel Neis Araujo
            Jun Pataleta Jun Pataleta
            Gladys Basiana Gladys Basiana
            Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Raquel Ortega, Sabina Abellan, Sara Arjona (@sarjona), David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              13/Jan/20

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m