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

Improve access to a users custom reports

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • Hide

      Setup.

      1. Create 3 diferent instances for the test
        • Instance 1: Clean install with the Patch.
        • Instance 2: Clean install without the Patch.
        • Instance 3: Clean install without the Patch.

      Test a clean installation.

      1. Using Instance 1.
      2. Login as admin.
      3. Open user menu.
      4. Confirm that the 'Reports' element exists in the User menu.
      5. Navigate to Site administration > Appearance > Theme settings
      6. Confirm that customusermenuitems value and default value match the following:
        • profile,moodle|/user/profile.php
          grades,grades|/grade/report/mygrades.php
          calendar,core_calendar|/calendar/view.php?view=month
          privatefiles,moodle|/user/files.php
          reports,core_reportbuilder|/reportbuilder/index.php

      7. Navigate to Site administration > Users > Permissions > Define roles
      8. Click on Edit icon for "Authenticated user" row
      9. Change "View custom reports" (moodle/reportbuilder:view) capability value to 'Not set'
      10. Click on Save changes button
      11. Create a new user "User Test"
      12. Log in as "User Test"
      13. Open user menu and click on Reports element.
      14. Confirm that "Access denied" alert is shown

       Test an upgrade without modifying the custom user menu.

      1. Using Instance 2.
      2. Login as admin.
      3. Open user menu.
      4. Confirm that the 'Reports' element does not exist in the User menu.
      5. Apply the Patch.
      6. Upgrade the instance.
      7. Login as admin.
      8. Open user menu.
      9. Confirm that the 'Reports'  element exists in the User menu.

      Test an upgrade after modifying the custom user menu.

      1. Using Instance 3.
      2. Login as admin.
      3. Navigate to Site administration > Appearance > Theme settings
      4. Add 'reports,core_reportbuilder|/reportbuilder/index.php'  to the end of the customusermenuitems list.
      5. Add 'Debugging|/admin/settings.php?section=debugging ' to the end of the customusermenuitems list.
      6. Apply the Patch.
      7. Upgrade the instance.
      8. Login as admin.
      9. Open user menu.
      10. Confirm that the 'Debugging'  element exists in the User menu.
      11. Confirm that the 'Reports'  element exists in the User menu and it is not duplicated.
      Show
      Setup. Create 3 diferent instances for the test Instance 1 : Clean install with the Patch. Instance 2 : Clean install without the Patch. Instance 3 : Clean install without the Patch. Test a clean installation. Using Instance 1 . Login as admin. Open user menu. Confirm that the 'Reports' element exists in the User menu. Navigate to Site administration > Appearance > Theme settings Confirm that customusermenuitems  value and default value match the following: profile,moodle|/user/profile.php grades,grades|/grade/report/mygrades.php calendar,core_calendar|/calendar/view.php?view=month privatefiles,moodle|/user/files.php reports,core_reportbuilder|/reportbuilder/index.php Navigate to Site administration > Users > Permissions > Define roles Click on Edit icon for "Authenticated user" row Change "View custom reports" (moodle/reportbuilder:view) capability value to 'Not set' Click on Save changes button Create a new user "User Test" Log in as "User Test" Open user menu and click on Reports element. Confirm that "Access denied" alert is shown  Test an upgrade without modifying the custom user menu. Using Instance 2 . Login as admin. Open user menu. Confirm that the 'Reports' element does not exist in the User menu. Apply the Patch. Upgrade the instance. Login as admin. Open user menu. Confirm that the 'Reports'  element exists in the User menu. Test an upgrade after modifying the custom user menu. Using Instance 3 . Login as admin. Navigate to Site administration > Appearance > Theme settings Add ' reports,core_reportbuilder|/reportbuilder/index.php'   to the end of the customusermenuitems list. Add ' Debugging|/admin/settings.php?section=debugging ' to the end of the customusermenuitems list. Apply the Patch. Upgrade the instance. Login as admin. Open user menu. Confirm that the ' Debugging '  element exists in the User menu. Confirm that the 'Reports'  element exists in the User menu and it is not duplicated.

      Users can can access their list of reports if $CFG->enablecustomreports is set (it is by default, MDL-73598) and they have any of the following capabilities:

      • 'moodle/reportbuilder:editall',
      • 'moodle/reportbuilder:edit',
      • 'moodle/reportbuilder:view',

      Relevant method: https://github.com/moodle/moodle/blob/9cd77c4130f55420f7f0b38d3c583a847c977b78/reportbuilder/classes/permission.php#L47-L53

      However, without 'moodle/site:configview' there is no obvious way for them to navigate to their list of reports (note they can still access it if directly linked to the page)

      In Workplace we use a custom launcher:

      LMS should have a similar alternative (e.g. something on the user menu) that doesn't rely on granting access to view the admin tree to all users

      From discussion with emiliolozano, sanderbangma & rafaellechugo (please update issue as you see fit, and/or to add clarification )

        1. MDL-74030_instance1_1.png
          MDL-74030_instance1_1.png
          86 kB
        2. MDL-74030_instance1_2.png
          MDL-74030_instance1_2.png
          141 kB
        3. MDL-74030_instance1_3.png
          MDL-74030_instance1_3.png
          51 kB
        4. MDL-74030_instance2_1.png
          MDL-74030_instance2_1.png
          85 kB
        5. MDL-74030_instance2_2.png
          MDL-74030_instance2_2.png
          72 kB
        6. MDL-74030_instance3_3.png
          MDL-74030_instance3_3.png
          73 kB
        7. Screenshot_2022-02-28 Dashboard.png
          Screenshot_2022-02-28 Dashboard.png
          20 kB
        8. Screenshot 2022-02-28 at 14.25.29.png
          Screenshot 2022-02-28 at 14.25.29.png
          173 kB

            mikelmartíncorrales Mikel Martín Corrales
            pholden Paul Holden
            Amaia Anabitarte Amaia Anabitarte
            Victor Déniz Falcón Victor Déniz Falcón
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            1 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 36 minutes
                6h 36m

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