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

Profile / Participants list: Have roles with "Capabilities/moodle/course:viewsuspendedusers" respect the given setting

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Prerequisites

      1. Create a course "C1".
      2. Create a user "Teacher".
      3. Create two users, "Student1" and "Student2".
      4. Enrol users "Teacher" as Teacher and "Student1" and "Student2" as Student.
      5. Go to C1 > Participants.
      6. Suspend "Student1" enrolment:
        1. Click on the cog icon under the "Status" column (the "Edit enrolment" modal window opens).
        2. In the "Status" field, select "Suspended".
        3. Click on "Save changes".
      7. Remove the "Teacher" role permission to the capability course:viewsuspendedusers:
        1. Go to Site administration > Users > Permissions > Define roles.
        2. Edit the "Teacher" role.
        3. Click on "Show advanced" button.
        4. Filter for viewsuspendedusers.
        5. Select prevent and click on "Save changes" button.

      Test before the patch

      1. Log in as "Teacher".
      2. Go to C1 > Participants.
      3. Confirm that you see "Student1" is in the list, with the suspended warning.

      Test after the patch

      1. Log in as "Teacher".
      2. Go to C1 > Participants.
      3. Confirm that you don't see "Student1" is in the list.
      Show
      Prerequisites Create a course "C1". Create a user "Teacher". Create two users, "Student1" and "Student2". Enrol users "Teacher" as Teacher and "Student1" and "Student2" as Student . Go to C1 > Participants . Suspend "Student1" enrolment: Click on the cog icon under the "Status" column (the "Edit enrolment" modal window opens). In the "Status" field, select "Suspended". Click on "Save changes". Remove the "Teacher" role permission to the capability course:viewsuspendedusers : Go to Site administration > Users > Permissions > Define roles . Edit the "Teacher" role. Click on "Show advanced" button. Filter for viewsuspendedusers . Select prevent and click on "Save changes" button. Test before the patch Log in as "Teacher". Go to C1 > Participants . Confirm that you see "Student1" is in the list, with the suspended warning. Test after the patch Log in as "Teacher". Go to C1 > Participants . Confirm that you don't see "Student1" is in the list.
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-63895-master

      Description

      I do not want my teachers to see course-level suspended users on the Participants page, so I removed that permission from the teacher role: Capabilities/moodle/course:viewsuspendedusers

      (see image 1)

      However, they can still see suspended users in both the Participants list. 

      Teacher's view of Participant List still shows suspended users - teachers can even click on the users' names and see the profile:

       

      (see image 2)

       

      Is this a regression from the updated Participants page, or is this not the intended purpose of that permission.

        Attachments

        1. image 1.png
          image 1.png
          45 kB
        2. image 2.png
          image 2.png
          46 kB

          Activity

            People

            • Assignee:
              vmdef Víctor Déniz Falcón
              Reporter:
              jprovasnik John Provasnik
              Participants:
              Component watchers:
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              14 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h