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

Improve get_role_users() to get it working with text fields

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE

      Description

      Right now the get_role_users() function works ok with the default list of fields, also with arbitrary ones. But it does not work ok if any TEXT field is passed.

      Oracle (maybe MSSQL too) breaks because of DISTINCT query containing TEXT fields.

      That happens both when a TEXT filed is explicitly passed or when structures like u.* are used.

      And it forces to 1) build an ugly list of fields to pass ([example|]). or 2) perform extra queries to fetch those TEXT fields incorporated.

      So, this issue is about to modify the get_role_users() function to work perfectly with TEXT fields under all DBs. And change ugly uses when possible.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Amaia Anabitarte, David Mudrák (@mudrd8mz), Sara Arjona (@sarjona)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: