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

get_role_users() does not recognise "u.*" and "u.fieldname AS fieldalias" in the fields list (regression from MDL-52574)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1.2
    • 3.1, 3.1 regressions
    • Libraries
    • MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • MDL_55423_master
    • Hide

      Run the PHPUnit tests in lib/tests/accesslib_test.php. From the Moodle root directory:

      php vendor/bin/phpunit core_accesslib_testcase lib/tests/accesslib_test.php
      

      Change the user as appropriate to your installation.

      Show
      Run the PHPUnit tests in lib/tests/accesslib_test.php. From the Moodle root directory: php vendor/bin/phpunit core_accesslib_testcase lib/tests/accesslib_test.php Change the user as appropriate to your installation.

      Things that were broken by the new code added there:

      • Passing $fields = 'u.*'. You get debugging like 'Debugging: get_role_users() adding u.lastname, u.firstname, u.id to the query result because they were required by $sort but missing in $fields'
      • Passing $fields = 'u.id AS some_alias'.

      I am also pretty sure that the call to get_role_users in grade/report/singleview/classes/local/screen/select.php is likely to trigger the new debugging, and needs to be fixed.

            alexandru.elisei Alexandru Elisei
            timhunt Tim Hunt
            Tim Hunt Tim Hunt
            Dan Poltawski Dan Poltawski
            Mark Nelson Mark Nelson
            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.