Note:

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

Access API: Difference between revisions

From MoodleDocs
(Created page with "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.")
 
No edit summary
Line 1: Line 1:
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.
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()
....

Revision as of 07:22, 11 January 2012

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()

....