Note:

This site is no longer used and is in read-only mode. Instead please go to our new Moodle Developer Resource site.

Creating roles programmatically

From MoodleDocs
Revision as of 18:05, 1 March 2013 by Patrick Thibaudeau (talk | contribs) (Created page with "You may find that the default roles do not answer the needs of your plugin. In that case, you want to create a role programmatically. ==Setup== The first step is to create an in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

You may find that the default roles do not answer the needs of your plugin. In that case, you want to create a role programmatically.

Setup

The first step is to create an install.php file in the db folder of your plugin.

''moodle root''/mod/myplugin/db/install.php