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

    • 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.

      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

            timhunt Tim Hunt
            timhunt Tim Hunt
            Sam Marshall Sam Marshall
            Jun Pataleta Jun Pataleta
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.