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

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.7.5, 3.8.2
    • 3.7.6, 3.8.3
    • Roles / Access
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • 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.

    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

            timhunt Tim Hunt
            timhunt Tim Hunt
            Sam Marshall Sam Marshall
            Jun Pataleta Jun Pataleta
            CiBoT CiBoT
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              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