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

Ambiguous reference to sortorder in the Flat file enrolment plug-in

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.9
    • Fix Version/s: None
    • Component/s: Enrolments
    • Labels:
      None
    • Database:
      PostgreSQL
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      The Flat file enrolment plug-in generates an SQL error when calling the get_users_by_capability function. The php warning reads:

      Warning - in /home/davidvm/public_html/pilot/lib/adodb/drivers/adodb-postgres7.inc.php(115): pg_query() [function.pg-query]: Query failed: ERROR: column reference "sortorder" is ambiguous

      The issue seems to be that the sort parameter pass in get_users_by_capability requires an "r." prefix.

      While looking for the cause of this issue I notice that get_assignable_roles function in accesslib.ph could potentially have the same problem.

      I include a diff of the propose changes, I hope that helped.

      Regards,

      GV

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              poltawski Dan Poltawski
              Reporter:
              guidovega Guido Vega
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: