|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 // 00003 // Capability definitions for the rss_client block. 00004 // 00005 // The capabilities are loaded into the database table when the block is 00006 // installed or updated. Whenever the capability definitions are updated, 00007 // the module version number should be bumped up. 00008 // 00009 // The system has four possible values for a capability: 00010 // CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set). 00011 // 00012 // 00013 // CAPABILITY NAMING CONVENTION 00014 // 00015 // It is important that capability names are unique. The naming convention 00016 // for capabilities that are specific to modules and blocks is as follows: 00017 // [mod/block]/<plugin_name>:<capabilityname> 00018 // 00019 // component_name should be the same as the directory name of the mod or block. 00020 // 00021 // Core moodle capabilities are defined thus: 00022 // moodle/<capabilityclass>:<capabilityname> 00023 // 00024 // Examples: mod/forum:viewpost 00025 // block/recent_activity:view 00026 // moodle/site:deleteuser 00027 // 00028 // The variable name for the capability definitions array is $capabilities 00029 00030 00031 $capabilities = array( 00032 00033 'block/rss_client:manageownfeeds' => array( 00034 00035 'captype' => 'write', 00036 'contextlevel' => CONTEXT_BLOCK, 00037 'archetypes' => array( 00038 'teacher' => CAP_ALLOW, 00039 'editingteacher' => CAP_ALLOW, 00040 'manager' => CAP_ALLOW 00041 ) 00042 ), 00043 00044 'block/rss_client:manageanyfeeds' => array( 00045 00046 'riskbitmask' => RISK_SPAM, 00047 00048 'captype' => 'write', 00049 'contextlevel' => CONTEXT_BLOCK, 00050 'archetypes' => array( 00051 'manager' => CAP_ALLOW 00052 ) 00053 ) 00054 00055 ); 00056 00057