Adding Capabilities

Adding Capabilities

by Ian Tasker -
Number of replies: 1
Hi,

I have a block which i would like to restrict function access via role capabilities.
when i install the block i would like to add the capabilities so i can assign them to roles.

is this possible?
i have tried add_capabilities() but i get function not found.
Average of ratings: -
In reply to Ian Tasker

Re: Adding Capabilities

by Dan Poltawski -
No there isn't an 'add_capabilites()' function.

You will need to create an access.php file in your block's db/ folder which describes the capabilities. This page about addding capabilities in moodledocs seems to give a pretty good overview: Development:NEWMODULE_Adding_capabilities

Please post again if we need to clarify more in that documenation!