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

get_role_users() can generate SQL error on MS-SQL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.2.2, 2.3.2
    • Enrolments
    • Microsoft SQL
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • Easy

      get_role_users() takes the paramater $sort. According to the comments above this function it can be used to "sort from user (u.) , role assignment (ra) or role (r.)". But when running Moodle on Microsoft SQL it is possible to generate an SQL error when sorting by a field which is not within the user table. The following was generated when using "ra.timemodified" as $sort:

      "Debug info: ORDER BY items must appear in the select list if SELECT DISTINCT is specified."

            Unassigned Unassigned
            markdw Mark Ward
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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