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

get_enrolled_sql seems to be broken when $withcapability and $groupid are specified.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Enrolments
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Hi Petr,
      Was working on porting MDL-23848 to head and came across a couple of bugs within get_enrolled_sql.

      In this case it appears the SQL for making use of $groupid is broken, it is joining on group_members.id with $groupid, which of course only ever returns one record.
      I assume it is meant to be joining on group_members.groupid and as this is a blocker I will commit the fix, but could you please review and make any required changes, I'd hate to have broken other areas with this commit.

      Also worth noting I just created MDL-24245 which you may want to look at at the same time

      Cheers
      Sam.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                samhemelryk Sam Hemelryk
                Reporter:
                samhemelryk Sam Hemelryk
                Tester:
                Nobody
                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:
                  Fix Release Date:
                  24/Nov/10