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

count_role_users gives unexpected results

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.7, 2.8.5
    • Fix Version/s: 2.7.8, 2.8.6
    • Component/s: Roles / Access
    • Labels:
    • Testing Instructions:
      Hide

      Run the lib/tests/accesslib_test.php unit tests. They should all pass.

      If they are run without the last commit in the attached branches the new unit test for count_role_users will fail.

      This should be tested against all databases.

      Show
      Run the lib/tests/accesslib_test.php unit tests. They should all pass. If they are run without the last commit in the attached branches the new unit test for count_role_users will fail. This should be tested against all databases.
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      The count_role_users function in lib/accesslib.php gives the wrong results if a user has the same role at multiple levels in a context path.

      For example a user is a coursecreator on a course and the category that the course is in, in this case they would be counted twice, rather than being recognised as the same user.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nmagill Neill Magill
              Reporter:
              nmagill Neill Magill
              Integrator:
              Andrew Nicols
              Tester:
              Adrian Greeve
              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:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/May/15