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

Capabilities overview breaks if there is a missing context.

    XMLWordPrintable

Details

    • MOODLE_25_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Hide

      The easiest way to test this is to hack directly in the database:

      1. Make a new override somewhere through the UI.
      2. In the DB, edit the context of that override, and change the context path so that the parent context is something that does not exist.
      3. Then, go to Admin -> Users -> Permissions -> Capability overview and run the report for the capability you overrode.
      4. Verify that you can see the report for all the context where things are fine. The context where you broke the path just will not show up.
      Show
      The easiest way to test this is to hack directly in the database: Make a new override somewhere through the UI. In the DB, edit the context of that override, and change the context path so that the parent context is something that does not exist. Then, go to Admin -> Users -> Permissions -> Capability overview and run the report for the capability you overrode. Verify that you can see the report for all the context where things are fine. The context where you broke the path just will not show up.

    Description

      Suppose that, due to a past bug, you have some a role_capability that points to a non-existent contextid.

      In this case tool_capability dies with a fatal error. It should do handle it better.

      Attachments

        Activity

          People

            timhunt Tim Hunt
            timhunt Tim Hunt
            Petr Skoda Petr Skoda
            Sam Hemelryk Sam Hemelryk
            Frédéric Massart Frédéric Massart
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              13/Jan/14