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

Create "Cohort members" custom report source

    XMLWordPrintable

Details

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-72172-master
    • Hide

      Setup

      1. Create 3 users (User 1..3)
      2. Create 3 cohorts (Cohort 1..3)
      3. Edit the description of Cohort 2 to include an image
      4. Add User 1 to Cohort 1
      5. Add User 1 & User 2 to Cohort 2

      Test report source

      1. Login as admin
      2. Navigate to Reports > Report builder > Custom reports in site administration
      3. Press New report
        • Name: My cohort report
        • Report source: Cohorts
        • Include default setup: Yes
      4. Press Save
      5. Confirm the following default columns are present:
        • Category
        • Name
        • Cohort ID
        • Description
      6. Open Settings > Conditions
      7. Confirm there are no default conditions
      8. Open Settings > Filters
      9. Confirm the following default filters are present:
        • Category
        • Name
      10. Close the Settings bar
      11. Confirm report content lists all cohorts previously created
      12. Confirm Description column renders the image properly for Cohort 2
      13. Add the following columns:
        • Cohort member > Time added
        • User > Email address
      14. Confirm new columns show the time/email of the users you added to each cohort
      15. Set aggregation for Time added column to Count
      16. Rename Time added column to User count
      17. Set aggregation for Email address column to Comma separated values
      18. Rename Email address column to User emails
      19. Confirm your report now contains count and emails of all members
      20. Open Settings > Conditions
      21. Add Cohort > Category condition
      22. Set Cohort > Category condition to Is equal to: System and press Apply
      23. Confirm only those cohorts in System category are listed
      24. Press Preview
      25. Press Filters
      26. Set Name filter to Is equal to: Cohort 2 and press Apply
      27. Confirm only Cohort 2 is listed in the report
      Show
      Setup Create 3 users (User 1..3) Create 3 cohorts (Cohort 1..3) Edit the description of Cohort 2 to include an image Add User 1 to Cohort 1 Add User 1 & User 2 to Cohort 2 Test report source Login as admin Navigate to Reports > Report builder > Custom reports in site administration Press New report Name: My cohort report Report source: Cohorts Include default setup: Yes Press Save Confirm the following default columns are present: Category Name Cohort ID Description Open Settings > Conditions Confirm there are no default conditions Open Settings > Filters Confirm the following default filters are present: Category Name Close the Settings bar Confirm report content lists all cohorts previously created Confirm Description column renders the image properly for Cohort 2 Add the following columns: Cohort member > Time added User > Email address Confirm new columns show the time/email of the users you added to each cohort Set aggregation for Time added column to Count Rename Time added column to User count Set aggregation for Email address column to Comma separated values Rename Email address column to User emails Confirm your report now contains count and emails of all members Open Settings > Conditions Add Cohort > Category condition Set Cohort > Category condition to Is equal to: System and press Apply Confirm only those cohorts in System category are listed Press Preview Press Filters Set Name filter to Is equal to: Cohort 2 and press Apply Confirm only Cohort 2 is listed in the report

    Description

      As part of MDL-70343 epic (specifically MDL-70795), we will create a custom report source (datasource in Report builder terminology) for "Cohort members" - this will become a good example of a many-to-many relationship between entities, and as such is a good candidate for testing report aggregation:

      1. Show me all/filtered cohorts with aggregated list of their members
      2. Show me all/filtered users with aggregated list of their cohorts

      Columns

      1. Cohort
        • Context
        • Name
        • ID number
        • Description
        • Visible
        • Component
        • Time created
        • Time modified
        • Source
        • Theme
      2. Cohort member
        • Time added
      3. User
        • <Everything from user entity>

      Filters

      1. Cohort
        • Context (default) [select filter; all available contexts in use by the report]
        • Name (default) [text filter]
        • ID number [text filter]
        • Time created [date filter]
      2. Cohort member
        • Time added [date filter]
      3. User
        • <Everything from user entity>

      Conditions

      1. Same as filters (no defaults)

      Attachments

        1. MDL-72172_9.png
          MDL-72172_9.png
          104 kB
        2. MDL-72172_7.png
          MDL-72172_7.png
          102 kB
        3. MDL-72172_5.png
          MDL-72172_5.png
          104 kB
        4. MDL-72172_27.png
          MDL-72172_27.png
          71 kB
        5. MDL-72172_23.png
          MDL-72172_23.png
          106 kB
        6. MDL-72172_19.png
          MDL-72172_19.png
          109 kB
        7. MDL-72172_14.png
          MDL-72172_14.png
          148 kB
        8. MDL-72172_11_12.png
          MDL-72172_11_12.png
          103 kB

        Issue Links

          Activity

            People

              pholden Paul Holden
              pholden Paul Holden
              Carlos Castillo Carlos Castillo
              Ilya Tregubov Ilya Tregubov
              Mihail Geshoski Mihail Geshoski
              David Matamoros, Mikel Martín Corrales, Paul Holden
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                19/Apr/22

                Time Tracking

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