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

admin/tool/monitor/index.php link should check at appropriate context

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.8
    • 2.8
    • Administration
    • MOODLE_28_STABLE
    • MOODLE_28_STABLE
    • MDL-47862-master
    • Hide
      Link capabilities
      1. Login in as admin
      2. Go to Site administration > Reports > Event monitoring rules
      3. Click "Enable"
      4. Create a user
      5. Create 3 courses
        1. Set that user as an editing teacher on Course 1
        2. Set that user as a non-editing teacher on Course 2
        3. Set that user as a non-editing teacher on Course 3
      6. Go to course 2 then follow Course administration > Event monitoring rules
      7. Create a rule (any fields are fine)
      8. Go to "Site administration > Users > Permissions > Define roles"
      9. Edit the "non-editing teacher" role
      10. Untick allow on the tool/monitor:managerules capability and save changes
      11. Go to the front page then follow My profile settings > Event monitoring
      12. Check that "You can manage rules from Event monitoring rules page" is displayed
      13. Go to the front page then follow Front page settings > Users > Permissions > Assigned roles
      14. Assign the non-editing teacher role to the user
      15. Log out
      16. Login as the teacher
      17. Go to the front page, then follow My profile settings > Event monitoring
      18. Check that "You can manage rules from Event monitoring rules page" is not displayed
      19. Go into Course 1 then follow My profile settings > Event monitoring
      20. Check that "You can manage rules from Event monitoring rules page" is displayed
      21. Follow that link, and create a course level rule
      22. Go back to My profile settings > Event monitoring
      23. Check that "You can manage rules from Event monitoring rules page" is displayed
      24. Go to Course 2 then follow the My profile settings > Event monitoring
      25. Check that "You can manage rules from Event monitoring rules page" is not displayed
      26. Go to Course 3 then follow My profile settings > Event monitoring
      27. Check that "You can manage rules from Event monitoring rules page" is not displayed
      Navigation
      1. Login as Admin
      2. Go to My profile settings -> Event monitoring
      3. Select "Site" in the course dropdown
      4. Check that the breadcrumb is displayed and "My profile settings ► Event monitoring" is open in the nav tree
      5. Click on the "You can manage rules from Event monitoring rules page" link.
      6. Check that "Site administration ► Reports ► Event monitoring rules" is open in the nav and displayed in the breadcrumb
      7. Click on the "You can subscribe to rules from the Event monitoring page" link.
      8. Select your moodle site's name in the course dropdown (e.g. Integration Master PostgreSQL) - this is the frontpage
      9. Check that the breadcrumb is displayed and "My profile settings ► Event monitoring" is open in the nav tree
      10. Click on the "You can manage rules from Event monitoring rules page" link.
      11. Check that the breadcrumb is displayed and "Front page settings ► Reports ► Event monitoring rules" is open in the nav tree
      12. Go to home
      13. Click "Front page settings ► Reports ► Event monitoring rules" in the nav tree
      14. You should be taken to the rules page
      15. Check that the breadcrumb is displayed and "Front page settings ► Reports ► Event monitoring rules" is open in the nav tree
      Show
      Link capabilities Login in as admin Go to Site administration > Reports > Event monitoring rules Click "Enable" Create a user Create 3 courses Set that user as an editing teacher on Course 1 Set that user as a non-editing teacher on Course 2 Set that user as a non-editing teacher on Course 3 Go to course 2 then follow Course administration > Event monitoring rules Create a rule (any fields are fine) Go to "Site administration > Users > Permissions > Define roles" Edit the "non-editing teacher" role Untick allow on the tool/monitor:managerules capability and save changes Go to the front page then follow My profile settings > Event monitoring Check that "You can manage rules from Event monitoring rules page" is displayed Go to the front page then follow Front page settings > Users > Permissions > Assigned roles Assign the non-editing teacher role to the user Log out Login as the teacher Go to the front page, then follow My profile settings > Event monitoring Check that "You can manage rules from Event monitoring rules page" is not displayed Go into Course 1 then follow My profile settings > Event monitoring Check that "You can manage rules from Event monitoring rules page" is displayed Follow that link, and create a course level rule Go back to My profile settings > Event monitoring Check that "You can manage rules from Event monitoring rules page" is displayed Go to Course 2 then follow the My profile settings > Event monitoring Check that "You can manage rules from Event monitoring rules page" is not displayed Go to Course 3 then follow My profile settings > Event monitoring Check that "You can manage rules from Event monitoring rules page" is not displayed Navigation Login as Admin Go to My profile settings -> Event monitoring Select "Site" in the course dropdown Check that the breadcrumb is displayed and "My profile settings ► Event monitoring" is open in the nav tree Click on the "You can manage rules from Event monitoring rules page" link. Check that "Site administration ► Reports ► Event monitoring rules" is open in the nav and displayed in the breadcrumb Click on the "You can subscribe to rules from the Event monitoring page" link. Select your moodle site's name in the course dropdown (e.g. Integration Master PostgreSQL) - this is the frontpage Check that the breadcrumb is displayed and "My profile settings ► Event monitoring" is open in the nav tree Click on the "You can manage rules from Event monitoring rules page" link. Check that the breadcrumb is displayed and "Front page settings ► Reports ► Event monitoring rules" is open in the nav tree Go to home Click "Front page settings ► Reports ► Event monitoring rules" in the nav tree You should be taken to the rules page Check that the breadcrumb is displayed and "Front page settings ► Reports ► Event monitoring rules" is open in the nav tree

      In a/admin/tool/monitor/index.php there are checks for whether to show a link to the managerules.php page. These should be done at the correct context. If the selected item is a course, it should be at course context; otherwise it should be at site.

      Without this change, only the site admin or someone with a system context capability to managerules will see the managerules link, regardless of whether they have permission to add rules for that course.

            johno John Okely
            dobedobedoh Andrew Lyons
            Adrian Greeve Adrian Greeve
            Sam Hemelryk Sam Hemelryk
            Andrew Lyons Andrew Lyons
            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.