Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Access API

From MoodleDocs
Revision as of 07:22, 11 January 2012 by Martin Dougiamas (talk | contribs)

The Access API gives you functions so you can determine what the current user is allow to do, and it allows modules to extend Moodle with new capabilities.

Overview

Determining that a user has a given capability

has_capability() and friends

contexts

How to define new capabilities

overview of how to create new capabilities (including string names and help strings)

How to write SQL just for enrolled users

get_enrolled_sql()

....