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

Remove enrolled users link if user cannot see participants

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.4
    • 3.4
    • User management
    • MOODLE_34_STABLE
    • MOODLE_34_STABLE
    • MDL-59832_master-v2
    • Hide
      Test 1
      1. Create a course.
      2. Enrol a teacher into that course.
      3. Visit ‘Site administration’ > ‘Users’ > ‘Permissions’ > ‘Define roles’.
      4. Edit the teacher role.
      5. Unset the capability ‘moodle/course:viewparticipants’.
      6. Set the capability ‘moodle/course:enrolreview’.
      7. Log in as the teacher.
      8. Visit the course.
      9. Confirm you can see the 'Participants' link in the navigation.
      10. Click on the link and confirm it takes you to the page.
      11. Navigate to 'Course administration’ > ‘Users’.
      12. Confirm you can see the link ‘Enrolled users’
      13. Click on the link and confirm it takes you to the page.
      Test 2
      1. Create a course.
      2. Enrol a teacher into that course.
      3. Visit ‘Site administration’ > ‘Users’ > ‘Permissions’ > ‘Define roles’.
      4. Edit the teacher role.
      5. Set the capability ‘moodle/course:viewparticipants’.
      6. Unset the capability ‘moodle/course:enrolreview’.
      7. Log in as the teacher.
      8. Confirm you can not see the page link ‘Enrolled users’ in ‘Course administration’ > ‘Users’.
      9. Click on the 'Participants' link in the navigation.
      10. Confirm it takes you to the page.
      Test 3
      1. Create a course.
      2. Enrol a teacher into that course.
      3. Visit ‘Site administration’ > ‘Users’ > ‘Permissions’ > ‘Define roles’.
      4. Edit the teacher role.
      5. Unset the capability ‘moodle/course:viewparticipants’.
      6. Unset the capability ‘moodle/course:enrolreview’.
      7. Log in as the teacher.
      8. Confirm you can not see the page link ‘Participants' in the navigation.
      9. Confirm you can not see the page link ‘Enrolled users’ in ‘Course administration’ > ‘Users’.
      10. Visit <yoursite>/user/index.php?id=<courseid> and ensure you get a meaningful exception.

      Clean up

      1. Reset the permissions before you forget (both by default are allow).
      Show
      Test 1 Create a course. Enrol a teacher into that course. Visit ‘Site administration’ > ‘Users’ > ‘Permissions’ > ‘Define roles’. Edit the teacher role. Unset the capability ‘moodle/course:viewparticipants’. Set the capability ‘moodle/course:enrolreview’. Log in as the teacher. Visit the course. Confirm you can see the 'Participants' link in the navigation. Click on the link and confirm it takes you to the page. Navigate to 'Course administration’ > ‘Users’. Confirm you can see the link ‘Enrolled users’ Click on the link and confirm it takes you to the page. Test 2 Create a course. Enrol a teacher into that course. Visit ‘Site administration’ > ‘Users’ > ‘Permissions’ > ‘Define roles’. Edit the teacher role. Set the capability ‘moodle/course:viewparticipants’. Unset the capability ‘moodle/course:enrolreview’. Log in as the teacher. Confirm you can not see the page link ‘Enrolled users’ in ‘Course administration’ > ‘Users’. Click on the 'Participants' link in the navigation. Confirm it takes you to the page. Test 3 Create a course. Enrol a teacher into that course. Visit ‘Site administration’ > ‘Users’ > ‘Permissions’ > ‘Define roles’. Edit the teacher role. Unset the capability ‘moodle/course:viewparticipants’. Unset the capability ‘moodle/course:enrolreview’. Log in as the teacher. Confirm you can not see the page link ‘Participants' in the navigation. Confirm you can not see the page link ‘Enrolled users’ in ‘Course administration’ > ‘Users’. Visit <yoursite>/user/index.php?id=<courseid> and ensure you get a meaningful exception. Clean up Reset the permissions before you forget (both by default are allow).

      This is a very unlikely edge case.

      A very weird situation when capability 'moodle/course:viewparticipants' is removed from teacher role. In 3.3 teacher does not see "Participants" item in the navigation menu or boost flatnav. However teacher can access "Enrolled users" from "Course cog" > User > Enrolled users. In master when teacher tries to click on "Enrolled users" he sees an error "Sorry, but you do not currently have permissions to do that (View participants)"

            markn Mark Nelson
            damyon Damyon Wiese
            Damyon Wiese Damyon Wiese
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Adrian Greeve Adrian Greeve
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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