Source for file access.php
Documentation is available at access.php
* Moodle capability definitions for the Sloodle module.
* The capabilities are loaded into the database table when the module is
* installed or updated. Whenever the capability definitions are updated,
* the module version number should be bumped up.
* @copyright Copyright (c) 2008 Sloodle (various contributors)
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3
* @contributor Peter R. Bloomfield
// The system has four possible values for a capability:
// CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set).
// CAPABILITY NAMING CONVENTION
// It is important that capability names are unique. The naming convention
// for capabilities that are specific to modules and blocks is as follows:
// [mod/block]/<component_name>:<capabilityname>
// component_name should be the same as the directory name of the mod or block.
// Core moodle capabilities are defined thus:
// moodle/<capabilityclass>:<capabilityname>
// Examples: mod/forum:viewpost
// block/recent_activity:view
// moodle/site:deleteuser
// The variable name for the capability definitions array follows the format
// $<componenttype>_<component_name>_capabilities
// For the core capabilities, the variable is $moodle_capabilities.
// NOTE: many Sloodle components relate directly to Moodle components.
// In these cases, the standard capabilities for those components apply.
// For example, Sloodle module configuration is covered by the Moodle standard capability:
// moodle/course:manageactivities
// Viewing and editing avatar details will be handled by the user profile capabilities.
$mod_sloodle_capabilities =
array(
// Considered a 'staff' member in SL
'mod/sloodle:staff' =>
array(
'contextlevel' =>
CONTEXT_MODULE,
'editingteacher' =>
CAP_ALLOW,
// Authorising objects to access Sloodle
'mod/sloodle:objectauth' =>
array(
'riskbitmask' =>
RISK_CONFIG,
'contextlevel' =>
CONTEXT_MODULE,
'editingteacher' =>
CAP_ALLOW,
// Authorising user objects to access user-specific parts of Sloodle (e.g. blogging)
'mod/sloodle:userobjectauth' =>
array(
'contextlevel' =>
CONTEXT_MODULE,
'editingteacher' =>
CAP_ALLOW,
// Access and use classroom layout profiles
'mod/sloodle:uselayouts' =>
array(
'contextlevel' =>
CONTEXT_MODULE,
'editingteacher' =>
CAP_ALLOW,
// Edit and delete classroom layout profiles
'mod/sloodle:editlayouts' =>
array(
'contextlevel' =>
CONTEXT_MODULE,
'editingteacher' =>
CAP_ALLOW,
// Register an avatar with their own account
'mod/sloodle:registeravatar' =>
array(
'contextlevel' =>
CONTEXT_MODULE,
'editingteacher' =>
CAP_ALLOW,
// Distribute objects to own avatar
'mod/sloodle:distributeself' =>
array(
'contextlevel' =>
CONTEXT_MODULE,
'editingteacher' =>
CAP_ALLOW,
// Distribute objects to other avatars
'mod/sloodle:distributeothers' =>
array(
'riskbitmask' =>
RISK_SPAM,
'contextlevel' =>
CONTEXT_MODULE,
'editingteacher' =>
CAP_ALLOW,
Documentation generated on Mon, 07 Jul 2008 12:32:10 +0100 by phpDocumentor 1.4.0