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

Count enrolled users can count users more than once when users have been enrolled using different enrollment methods

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.1, 3.3.7, 3.4.4, 3.5.1, 3.6
    • Fix Version/s: 3.4.6, 3.5.3
    • Component/s: Enrolments
    • Labels:

      Description

      When using count_enrolled_users from lib/enrollib.php, and users may have been enrolled in a course by different methods or have several roles, the user count can differ from the actual amount of users.

      Attaching a patch that would count the distinct user ids. Optimized for PostgreSQL.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pholden Paul Holden
              Reporter:
              dvdcastro David Castro
              Peer reviewer:
              Daniel Neis Araujo
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              CiBoT
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Nov/18