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

Group concat aggregation method prevents sorting.

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_402_STABLE
    • Hide
      1. Login as admin
      2. Navigate to Site admin > Development > Make test course
      3. Create a test course of any size
      4. Navigate to Reports > Report builder > Custom reports in site administration
      5. Press New report
      6. Uncheck the "Include default setup" option and create a new report from the Users report source
      7. Add Fullname column
      8. Add Email column
      9. Open the "sorting" settings beside the report preview
      10. Tick the Full name checkbox to enable sorting for the fullname column.
      11. click the arrow beside the "full name" sorting checkbox to enable descending sorting for Full name
      12. Confirm that the column Full name is sortable
      13. Set Full name aggregation to Comma separated values
      14. Confirm that the column Full name is sortable
      Show
      Login as admin Navigate to Site admin > Development > Make test course Create a test course of any size Navigate to  Reports > Report builder > Custom reports  in site administration Press  New report Uncheck the "Include default setup" option and create a new report from the  Users report source Add  Fullname  column Add Email column Open the "sorting" settings beside the report preview Tick the Full name checkbox to enable sorting for the fullname column. click the arrow beside the "full name" sorting checkbox to enable descending sorting for Full name Confirm  that the column  Full name  is sortable Set  Full name aggregation to Comma separated values Confirm  that the column  Full name is sortable

      the group concat aggregation method defines that it can't be sorted:

      https://github.com/moodle/moodle/blob/master/reportbuilder/classes/local/aggregation/groupconcat.php#L71

      A good example of where this would be useful is a user report with a column that lists the groups they are a member of, most users are only in a single group, but a small handful are in 2, the teacher would like to be able to sort the report based on the data in the group field - and potentially just have the first item in the report ordered.

      I don't see any reason why the code should enforce that the columns aren't sortable when the groupconcat aggregation is in use.

      pholden do you have any feedback there?

        1. behaviour.gif
          behaviour.gif
          2.00 MB
        2. MDL-77412.gif
          MDL-77412.gif
          484 kB

            sumaiyajaved Sumaiya Javed
            danmarsden Dan Marsden
            Paul Holden Paul Holden
            David Carrillo David Carrillo
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 40 minutes
                2h 40m

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