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

Implement custom report audiences

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • Hide

      Setup

      1. Login as admin
      2. Navigate to Users > Accounts > Upload users in site administration
      3. Upload 72588-Users.csv and create all our test users
      4. Navigate to Users > Accounts > Cohorts in site administration
      5. Click on "Add new cohort"
      6. Type "Cohort1" in the name field and press "Save changes"
      7. Click on the assign icon on the Cohort1 row
      8. Search for user "David Palmer" and click the "Add" button to add the user to the cohort
      9. Navigate to Users > Accounts > Assign system roles in site administration
      10. Click on "Manager"
      11. Search for user "Paul Smith" and click on "Add" to assign this user the Manager role
      12. Navigate to Reports > Report builder > Custom reports in site administration
      13. Press New report
      14. Set report name to "Report1" and select "Users" report source
      15. Press Save
      16. Confirm you are taken to the report editor for your new report
      17. Click on the 'Audience' tab
      18. Confirm you see 4 audience types on the left: "All users", "Assigned system role", "Manually added users" and "Member of cohort"

      Manually added users

      1. Click on "Manually added users"
      2. Confirm you see a blue notification message "Added audience 'Manually added users'"
      3. Confirm a new form has been added on the right side with a user selector
      4. Add user "Kira Smith"
      5. Press the "Save changes" button
      6. Click on the 'Access' tab
      7. Confirm you see "Kira Smith" in the list
      8. Click on the 'Audience' tab
      9. Click on "Edit audience 'Manually added users'" icon
      10. Search and add user "Luna Jones" and press "Save changes"
      11. Click on the 'Access' tab
      12. Confirm you see "Kira Smith" and "Luna Jones" in the list

      Member of cohort

      1. Click on the 'Audience' tab
      2. Click on "Member of cohort"
      3. Confirm you see a blue notification message "Added audience 'Member of cohort'"
      4. Select "Cohort1" from the search in the form
      5. Press "Save changes"
      6. Click on the 'Access' tab
      7. Confirm you see "David Palmer" in the list

      Assigned system roles

      1. Click on the 'Audience' tab
      2. Click on "Assigned system roles"
      3. Confirm you see a blue notification message "Added audience 'Assigned system roles'"
      4. Select the role "Manager" from the list
      5. Press "Save changes"
      6. Click on the 'Access' tab
      7. Confirm you see "Paul Smith" in the list

      All usersĀ 

      1. Click on the 'Audience' tab
      2. Click on "All users"
      3. Confirm you see a blue notification message "Added audience 'All users'"
      4. Press "Save changes"
      5. Click on the 'Access' tab
      6. Confirm you see "Mikel Jones" in the list
      7. Confirm you see "Luana Thomas" in the list
      8. Confirm you see "Laia Jones" in the list
      9. Confirm you see "Alvin Smith" in the list
      10. Confirm you see "Simon Jones" in the list

      Filter in Access report

      1. Press Filters
      2. Confirm you see the Full name filter
      3. Set Full name filter to Contains: Laia
      4. Click "Apply"
      5. Confirm you see the blue notification message Filters applied
      6. Confirm only "Laia Jones" is listed in the report
      7. Press Filters > Reset all
      8. Confirm you see the message Filters reset
      9. Confirm you see again all users in the report

      Delete audience

      1. Click on the 'Audience' tab
      2. Click on "Delete audience 'All users'" icon
      3. Confirm a confirmation modal is showing up with the title "Delete audience 'All users'"
      4. Click on "Delete" button
      5. Click on the 'Access' tab
      6. Confirm you cannot see "Mikel Jones" in the list
      7. Confirm you cannot see "Luana Thomas" in the list
      8. Confirm you cannot see "Laia Jones" in the list
      9. Confirm you cannot see "Alvin Smith" in the list
      10. Confirm you cannot see "Simon Jones" in the list

      Create another report

      1. Navigate to Reports > Report builder > Custom reports in site administration
      2. Press New report
      3. Set report name to "Report2" and select Users report source
      4. Press Save

      Test if user can see Report1

      1. Log in as "PaulSmith"
      2. Navigate to Reports > Report builder > Custom reports in site administration
      3. Confirm you can see "Report1"
      4. Confirm you cannot see "Report2"
      5. Click on "Report1" link
      6. Confirm you can see the report
      Show
      Setup Login as admin Navigate to Users > Accounts > Upload users in site administration Upload 72588-Users.csv and create all our test users Navigate to Users > Accounts > Cohorts in site administration Click on "Add new cohort" Type "Cohort1" in the name field and press "Save changes" Click on the assign icon on the Cohort1 row Search for user "David Palmer" and click the "Add" button to add the user to the cohort Navigate to Users > Accounts > Assign system roles in site administration Click on "Manager" Search for user "Paul Smith" and click on "Add" to assign this user the Manager role Navigate to Reports > Report builder > Custom reports in site administration Press New report Set report name to "Report1" and select "Users" report source Press Save Confirm you are taken to the report editor for your new report Click on the 'Audience' tab Confirm you see 4 audience types on the left: "All users", "Assigned system role", "Manually added users" and "Member of cohort" Manually added users Click on "Manually added users" Confirm you see a blue notification message "Added audience 'Manually added users'" Confirm a new form has been added on the right side with a user selector Add user "Kira Smith" Press the "Save changes" button Click on the 'Access' tab Confirm you see "Kira Smith" in the list Click on the 'Audience' tab Click on "Edit audience 'Manually added users'" icon Search and add user "Luna Jones" and press "Save changes" Click on the 'Access' tab Confirm you see "Kira Smith" and "Luna Jones" in the list Member of cohort Click on the 'Audience' tab Click on "Member of cohort" Confirm you see a blue notification message "Added audience 'Member of cohort'" Select "Cohort1" from the search in the form Press "Save changes" Click on the 'Access' tab Confirm you see "David Palmer" in the list Assigned system roles Click on the 'Audience' tab Click on "Assigned system roles" Confirm you see a blue notification message "Added audience 'Assigned system roles'" Select the role "Manager" from the list Press "Save changes" Click on the 'Access' tab Confirm you see "Paul Smith" in the list All usersĀ  Click on the 'Audience' tab Click on "All users" Confirm you see a blue notification message "Added audience 'All users'" Press "Save changes" Click on the 'Access' tab Confirm you see "Mikel Jones" in the list Confirm you see "Luana Thomas" in the list Confirm you see "Laia Jones" in the list Confirm you see "Alvin Smith" in the list Confirm you see "Simon Jones" in the list Filter in Access report Press Filters Confirm you see the Full name filter Set Full name filter to Contains: Laia Click "Apply" Confirm you see the blue notification message Filters applied Confirm only "Laia Jones" is listed in the report Press Filters > Reset all Confirm you see the message Filters reset Confirm you see again all users in the report Delete audience Click on the 'Audience' tab Click on "Delete audience 'All users'" icon Confirm a confirmation modal is showing up with the title "Delete audience 'All users'" Click on "Delete" button Click on the 'Access' tab Confirm you cannot see "Mikel Jones" in the list Confirm you cannot see "Luana Thomas" in the list Confirm you cannot see "Laia Jones" in the list Confirm you cannot see "Alvin Smith" in the list Confirm you cannot see "Simon Jones" in the list Create another report Navigate to Reports > Report builder > Custom reports in site administration Press New report Set report name to "Report2" and select Users report source Press Save Test if user can see Report1 Log in as "PaulSmith" Navigate to Reports > Report builder > Custom reports in site administration Confirm you can see "Report1" Confirm you cannot see "Report2" Click on "Report1" link Confirm you can see the report

      The goal of this task is to allow report editors to have fine-grained control of which users can access their reports

      We will implement base audience classes and API's for interrogating report audiences, in a pluggable manner which will allow any component/subsystem to define their own audience types according to requirements

      The audience types to be implemented here:

      • All users
      • Specific users
      • Cohort members
      • System role assignments

      Alongside allowing user to configure audiences for their report, we will also implement a means for them to see a report of all users who match the configured audience for their report(s)

      When users view their listing of available reports, the audience of each report will be considered to ensure they can only access reports in which they are part of the intended audience

      As a follow up to this task, report audiences will be used to define delivery schedules (MDL-72598)

            davidcarrillo David Carrillo
            pholden Paul Holden
            Paul Holden Paul Holden
            Jun Pataleta Jun Pataleta
            Dongsheng Cai Dongsheng Cai
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 weeks, 4 days, 51 minutes
                3w 4d 51m

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