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

new function in mod/*modname*/lib.php '*modname*_get_relevant_capabilites'

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.3
    • Component/s: Roles / Access
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      I left this bug to be assigned automatically since I want the maintainer of the roles and capabilities code to take a look at the idea. I'm willing to code this though so assign the bug to me if you approve of the proposed feature addition and I can do it in the next few days.

      I want to allow a new optional function in mod/modname/lib.php 'modname_get_relevant_capabilites' that returns an array of capabilities.

      This is needed so that activity modules can specify additional capabilities that should appear in the in addition to the ones specifically for this module, that should be displayed in the 'Override Roles' sub tab (override.php) for a module context.

      An example of extra capabilities should be overridable in the module context are question capabilities for questions that are shared in the module context. The question code tests the users permissions for what they can do with questions in the context in which the questions are shared.

      For background see : http://moodle.org/mod/forum/discuss.php?d=80386

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              jamiesensei Jamie Pratt
              Tester:
              Nobody Nobody
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Oct/08