|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 // 00003 // Capability definitions for the survey module. 00004 // 00005 // The capabilities are loaded into the database table when the module 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 'mod/survey:participate' => array( 00034 00035 'captype' => 'read', 00036 'contextlevel' => CONTEXT_MODULE, 00037 'archetypes' => array( 00038 'student' => CAP_ALLOW, 00039 'teacher' => CAP_ALLOW, 00040 'editingteacher' => CAP_ALLOW, 00041 'manager' => CAP_ALLOW 00042 ) 00043 ), 00044 00045 'mod/survey:readresponses' => array( 00046 00047 'captype' => 'read', 00048 'contextlevel' => CONTEXT_MODULE, 00049 'archetypes' => array( 00050 'teacher' => CAP_ALLOW, 00051 'editingteacher' => CAP_ALLOW, 00052 'manager' => CAP_ALLOW 00053 ) 00054 ), 00055 00056 'mod/survey:download' => array( 00057 00058 'captype' => 'read', 00059 'contextlevel' => CONTEXT_MODULE, 00060 'archetypes' => array( 00061 'teacher' => CAP_ALLOW, 00062 'editingteacher' => CAP_ALLOW, 00063 'manager' => CAP_ALLOW 00064 ) 00065 ) 00066 00067 ); 00068 00069