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

Implement privacy provider to cover all user creatable report content

    XMLWordPrintable

Details

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • Hide

      Pre-requisities

      1. Ability to execute commands via CLI
      2. We'll be using privacy-export.php (from Privacy API/Utilities docs)
        • Place said file in the root of your Moodle site

      Setup

      1. Log in as admin
      2. Navigate to Users > Permissions > Define roles in site administration
      3. Edit the Manager role and allow the following capability:
        • moodle/reportbuilder:editall
      4. Create two new users and note their ID (we'll need them later):
        • User One
        • User Two
      5. Navigate to Users > Permissions > Assign system roles in site administration
      6. Assign both users to the Manager role
      7. Navigate to Reports > Report builder > Custom reports in site administration
      8. Create a new report from the Users report source
      9. In report editor, press Audiences tab
      10. Add the Assigned system role audience type, and choose the Manager role
      11. Press Schedules tab
      12. Create a new schedule, filling out required fields
      13. Log out
      14. Log in as User One
      15. Navigate to Reports > Report builder > Custom reports in site administration
      16. Create a new report from the Cohorts report source
      17. Close the editor
      18. Press Edit report content for the users report
      19. In report editor, press Audiences tab
      20. Add the All users audience type
      21. Log out
      22. Log in as User Two
      23. Navigate to Reports > Report builder > Custom reports in site administration
      24. Press Edit report content for the users report
      25. In report editor, press Schedules tab
      26. Create a new schedule, filling out required fields
      27. Log out

      Test admin

      1. Run the following command:

        $ php privacy-export.php --username=admin
        

      2. Open exported index file
      3. Navigate to Report builder
      4. Confirm presence of users report
        • Confirm data.json contains report data
        • Confirm audiences.json contains only the audience created by the admin
        • Confirm schedules.json contains only the schedule created by the admin
      5. Confirm cohorts report is not present

      Test User One

      1. Run the following command:

        $ php privacy-export.php --userid=<USERONEID>
        

      2. Open exported index file
      3. Navigate to Report builder
      4. Confirm presence of users report
        • Confirm data.json contains report data
        • Confirm audiences.json contains only the audience created by user one
        • Confirm schedules.json is not present
      5. Confirm presence of cohorts report
        • Confirm data.json contains report data

      Test User Two

      1. Run the following command:

        $ php privacy-export.php --userid=<USERTWOID>
        

      2. Open exported index file
      3. Navigate to Report builder
      4. Confirm presence of users report
        • Confirm data.json contains report data
        • Confirm audiences.json is not present
        • Confirm schedules.json contains only the schedule created by user two
      5. Confirm cohorts report is not present
      Show
      Pre-requisities Ability to execute commands via CLI We'll be using privacy-export.php (from Privacy API/Utilities docs) Place said file in the root of your Moodle site Setup Log in as admin Navigate to Users > Permissions > Define roles in site administration Edit the Manager role and allow the following capability: moodle/reportbuilder:editall Create two new users and note their ID (we'll need them later): User One User Two Navigate to Users > Permissions > Assign system roles in site administration Assign both users to the Manager role Navigate to Reports > Report builder > Custom reports in site administration Create a new report from the Users report source In report editor, press Audiences tab Add the Assigned system role audience type, and choose the Manager role Press Schedules tab Create a new schedule, filling out required fields Log out Log in as User One Navigate to Reports > Report builder > Custom reports in site administration Create a new report from the Cohorts report source Close the editor Press Edit report content for the users report In report editor, press Audiences tab Add the All users audience type Log out Log in as User Two Navigate to Reports > Report builder > Custom reports in site administration Press Edit report content for the users report In report editor, press Schedules tab Create a new schedule, filling out required fields Log out Test admin Run the following command: $ php privacy-export.php --username=admin Open exported index file Navigate to Report builder Confirm presence of users report Confirm data.json contains report data Confirm audiences.json contains only the audience created by the admin Confirm schedules.json contains only the schedule created by the admin Confirm cohorts report is not present Test User One Run the following command: $ php privacy-export.php --userid=<USERONEID> Open exported index file Navigate to Report builder Confirm presence of users report Confirm data.json contains report data Confirm audiences.json contains only the audience created by user one Confirm schedules.json is not present Confirm presence of cohorts report Confirm data.json contains report data Test User Two Run the following command: $ php privacy-export.php --userid=<USERTWOID> Open exported index file Navigate to Report builder Confirm presence of users report Confirm data.json contains report data Confirm audiences.json is not present Confirm schedules.json contains only the schedule created by user two Confirm cohorts report is not present

    Description

      It must export the following user creatable elements of a report, where the creator of each element is the user being exported:

      1. Reports (MDL-70795)
        • Export all report data
      2. Report audiences (MDL-72588)
        • Export all audience data
        • Export all data for linked report
      3. Report schedules (MDL-72598)
        • Export all schedule data
        • Export all data for linked report

      The listed tasks block this one

      Attachments

        Issue Links

          Activity

            People

              davidcarrillo David Carrillo
              pholden Paul Holden
              Mikel Martín Corrales Mikel Martín Corrales
              Ilya Tregubov Ilya Tregubov
              Sujith Haridasan Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 4 hours
                  1d 4h

                  Clockify

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