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

Accesslib role caching get confused by a role with no capabilities

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4.3, 3.5, 3.6
    • Fix Version/s: 3.4.4, 3.5.1
    • Component/s: Roles / Access
    • Labels:

      Description

      Steps to reproduce (easiest to be logged in in one browser as admin, and another as Student):

      1. Turn on performance info, so you can see a count of DB queries in the page footer.
      2. Log in as student, view a course page, and check the performance information is there. (Try to find a course with many activities.)
      3. Note the number of DB reads.
      4. Creat a new role, name 'Incapabable'
      5. Assigne that role to the student use, either at system level, or in the course.
      6. Logged in as student, reload the course page.
      7. Note the number of DB queries.

      Expected result: the number of queries does not change much.

      Actual result: the number of queries jumps by about the number of has_capability calls on the page.

      Verification:

      1. Edit the 'Incapable' role and add any one capability.
      2. As student, reload the course page.
      3. Verify that the number of DB queries goes down again.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jul/18