|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 // 00003 // Capability definitions for the chat 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/chat:chat' => array( 00034 00035 'riskbitmask' => RISK_SPAM, 00036 00037 'captype' => 'write', 00038 'contextlevel' => CONTEXT_MODULE, 00039 'archetypes' => array( 00040 'student' => CAP_ALLOW, 00041 'teacher' => CAP_ALLOW, 00042 'editingteacher' => CAP_ALLOW, 00043 'manager' => CAP_ALLOW 00044 ) 00045 ), 00046 00047 'mod/chat:readlog' => array( 00048 00049 'captype' => 'read', 00050 'contextlevel' => CONTEXT_MODULE, 00051 'archetypes' => array( 00052 'student' => CAP_ALLOW, 00053 'teacher' => CAP_ALLOW, 00054 'editingteacher' => CAP_ALLOW, 00055 'manager' => CAP_ALLOW 00056 ) 00057 ), 00058 00059 'mod/chat:deletelog' => array( 00060 00061 'captype' => 'write', 00062 'contextlevel' => CONTEXT_MODULE, 00063 'archetypes' => array( 00064 'teacher' => CAP_ALLOW, 00065 'editingteacher' => CAP_ALLOW, 00066 'manager' => CAP_ALLOW 00067 ) 00068 ), 00069 00070 'mod/chat:exportparticipatedsession' => array( 00071 00072 'riskbitmask' => RISK_PERSONAL, 00073 00074 'captype' => 'read', 00075 'contextlevel' => CONTEXT_MODULE, 00076 'archetypes' => array( 00077 'teacher' => CAP_ALLOW, 00078 'editingteacher' => CAP_ALLOW, 00079 'manager' => CAP_ALLOW, 00080 // not student - nervous about allowing this by default 00081 ), 00082 00083 ), 00084 00085 'mod/chat:exportsession' => array( 00086 00087 'riskbitmask' => RISK_PERSONAL, 00088 00089 'captype' => 'read', 00090 'contextlevel' => CONTEXT_MODULE, 00091 'archetypes' => array( 00092 'teacher' => CAP_ALLOW, 00093 'editingteacher' => CAP_ALLOW, 00094 'manager' => CAP_ALLOW, 00095 ), 00096 ), 00097 00098 ); 00099 00100