Best way to add a new capability

Best way to add a new capability

by Joe Cape -
Number of replies: 0
Picture of Plugin developers

I'm looking for a way to set a capability to add new events to the calendar of everyone who belongs to one of your groups ( http://tracker.moodle.org/browse/MDL-29237 ) . I've found a way to do it, but I can't see how to add a new capability in order to chang the behaviour of an existing component (in this case the calendar) . When adding a new component I create a folder 'db' and a file 'access.php' that sets the new capabilities. 

If I'm looking to patch the existing calendar, should I just do the same and create a version.php file so that it can be updated in the system or is there a generic place to set new capabilities?

Average of ratings: -