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

get_with_capability_join OR logic is wrong when two capabilities are passed and one is overridden with a prevent (affects Quiz reports)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7.5, 3.8.2
    • Fix Version/s: 3.7.6, 3.8.3
    • Component/s: Roles / Access
    • Labels:
    • Testing Instructions:
      Hide

      There should be no visible change. The automated tests will regression-test this.

      Please run the accesslib unit tests with PHPUNIT_LONGTEST set to 1.

      Show
      There should be no visible change. The automated tests will regression-test this. Please run the accesslib unit tests with PHPUNIT_LONGTEST set to 1.
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull Master Branch:

      Description

      The place this can make a difference is in the quiz reports: steps to reproduce:

      1. Go to the quiz report for a quiz (e.g. https://qa.moodledemo.net/mod/quiz/report.php?id=30&mode=overview)
      2. Note that some students are shown
      3. In another tab, open the Permissions setting for that quiz (e.g. https://qa.moodledemo.net/admin/roles/permissions.php?contextid=9063)
      4. Remove one of the mod/quiz:reviewmyattempts or mod/quiz:attempt capabilities, but not both.
      5. Reload the quiz report.

      Expected result: the students are not shown.
      Actual result: 'No students enrolled in this course yet' message.

      Original report came from this thread: https://moodle.org/mod/forum/discuss.php?d=400078#p1615266

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            timhunt Tim Hunt
            Peer reviewer:
            Sam Marshall Sam Marshall
            Integrator:
            Jun Pataleta Jun Pataleta
            Tester:
            CiBoT CiBoT
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

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

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 30 minutes
                3h 30m