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

Separate course participant enrol/role elements to new report entities

XMLWordPrintable

    • MOODLE_402_STABLE
    • MOODLE_403_STABLE
    • Hide

      Setup

      1. Log in as admin
      2. Create a user
      3. Create a course
      4. Enrol user in course as student
      5. Open a terminal in order to inspect your web server error log, e.g.

        $ tail -f /var/log/apache2/moodle-error.log
        

      Prior to checking out branch

      1. Navigate to Reports from user menu
      2. Create new report from Course participants report source
        • Include default setup = No
      3. Add the following columns:
        • Course > Course full name
        • User > Full name
        • Enrolment > Method
        • Enrolment > Role
      4. Add Enrolment > Method condition
      5. Add Enrolment > Method filter

      Checkout MDL-76900 branch

      1. Purge caches to refresh class loader
      2. Navigate back to report you previously created
      3. Confirm you see exactly the same columns, filters & conditions you previously added
      4. Confirm you see one of each of the following debugging entries in your log:
        • Debugging: The column 'enrolment:method' is deprecated, please do not use it any more. See 'enrol:name' for replacement
        • Debugging: The column 'enrolment:role' is deprecated, please do not use it any more. See 'role:name' for replacement
        • Debugging: The condition 'enrolment:method' is deprecated, please do not use it any more. See 'enrol:plugin' for replacement
        • Debugging: The filter 'enrolment:method' is deprecated, please do not use it any more. See 'enrol:plugin' for replacement
      5. Close editor
      6. Create second new report from Course participants report source
        • Include default setup = Yes
      7. Confirm Enrolment > Method & Enrolment > Role columns are not available for selection
      8. Confirm Enrolment > Method condition is not available for selection
      9. Confirm Enrolment > Method filter is not available for selection
      10. Add Role > Role name column to report
      11. Confirm report shows the following columns with correct content:
        • Course > Course full name with link
        • Enrolment method > Name
        • User > Full name with link
        • Role > Role name
      Show
      Setup Log in as admin Create a user Create a course Enrol user in course as student Open a terminal in order to inspect your web server error log, e.g. $ tail -f /var/log/apache2/moodle-error.log Prior to checking out branch Navigate to Reports from user menu Create new report from Course participants report source Include default setup = No Add the following columns: Course > Course full name User > Full name Enrolment > Method Enrolment > Role Add Enrolment > Method condition Add Enrolment > Method filter Checkout MDL-76900 branch Purge caches to refresh class loader Navigate back to report you previously created Confirm you see exactly the same columns, filters & conditions you previously added Confirm you see one of each of the following debugging entries in your log: Debugging: The column 'enrolment:method' is deprecated, please do not use it any more. See 'enrol:name' for replacement Debugging: The column 'enrolment:role' is deprecated, please do not use it any more. See 'role:name' for replacement Debugging: The condition 'enrolment:method' is deprecated, please do not use it any more. See 'enrol:plugin' for replacement Debugging: The filter 'enrolment:method' is deprecated, please do not use it any more. See 'enrol:plugin' for replacement Close editor Create second new report from Course participants report source Include default setup = Yes Confirm Enrolment > Method & Enrolment > Role columns are not available for selection Confirm Enrolment > Method condition is not available for selection Confirm Enrolment > Method filter is not available for selection Add Role > Role name column to report Confirm report shows the following columns with correct content: Course > Course full name with link Enrolment method > Name User > Full name with link Role > Role name

      The course participants report source (MDL-74364) introduced some new entities, one of which was the enrolment entity

      The entity refers to "User enrolment" data, but also squashes in some elements that really belong in their own entities:

      1. Enrolment method column and filter should both belong to an 'enrol' entity;
      2. Role column should belong to a 'role' entity - this would also normalize the JOINs on this column and remove redundancy/duplication on the context table

      In doing so, we'll create clearer reporting with more in-depth data on both enrolment methods and/or roles. The 'role' entity specifically is required for MDL-76902

      Columns

      1. Enrolment method
        • Plugin
        • Name
        • Enabled
        • Duration
        • Start
        • End
      2. Role
        • Name
        • Short name
        • Description

      Filters/Conditions

      1. Enrolment method
        • Plugin
        • Enabled
        • Duration
        • Start
        • End
      2. Role
        • Name

      Note that this issue should also introduce an API to allow for old report elements (columns, filters) to be deprecated

      1. Existing elements already present should display in the report as normal, and emit debugging;
      2. They should not be listed in the report editor to allow for selection in new reports

      Also discovered MDL-76901 while looking at this - setting it as blocker because it'll make the debugging less noisy and allow for easier debug assertions in tests

            pholden Paul Holden
            pholden Paul Holden
            Mikel Martín Corrales Mikel Martín Corrales
            Ilya Tregubov Ilya Tregubov
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 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 - 1 day, 1 hour, 13 minutes
                1d 1h 13m

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