|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 // This file is part of Moodle - http://moodle.org/ 00003 // 00004 // Moodle is free software: you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation, either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // Moodle is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 00016 00017 // 00018 // Capability definitions for the feedback module. 00019 // 00020 // The capabilities are loaded into the database table when the module is 00021 // installed or updated. Whenever the capability definitions are updated, 00022 // the module version number should be bumped up. 00023 // 00024 // The system has four possible values for a capability: 00025 // CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set). 00026 // 00027 // 00028 // CAPABILITY NAMING CONVENTION 00029 // 00030 // It is important that capability names are unique. The naming convention 00031 // for capabilities that are specific to modules and blocks is as follows: 00032 // [mod/block]/<plugin_name>:<capabilityname> 00033 // 00034 // component_name should be the same as the directory name of the mod or block. 00035 // 00036 // Core moodle capabilities are defined thus: 00037 // moodle/<capabilityclass>:<capabilityname> 00038 // 00039 // Examples: mod/forum:viewpost 00040 // block/recent_activity:view 00041 // moodle/site:deleteuser 00042 // 00043 // The variable name for the capability definitions array is $capabilities 00044 00045 00046 $capabilities = array( 00047 00048 'mod/feedback:view' => array( 00049 00050 'captype' => 'read', 00051 'contextlevel' => CONTEXT_MODULE, 00052 'archetypes' => array( 00053 'guest' => CAP_ALLOW, 00054 'student' => CAP_ALLOW, 00055 'teacher' => CAP_ALLOW, 00056 'editingteacher' => CAP_ALLOW, 00057 'manager' => CAP_ALLOW 00058 ) 00059 ), 00060 00061 'mod/feedback:complete' => array( 00062 00063 'riskbitmask' => RISK_SPAM, 00064 00065 'captype' => 'write', 00066 'contextlevel' => CONTEXT_MODULE, 00067 'archetypes' => array( 00068 'student' => CAP_ALLOW 00069 ) 00070 ), 00071 00072 'mod/feedback:viewanalysepage' => array( 00073 00074 'riskbitmask' => RISK_PERSONAL, 00075 00076 'captype' => 'read', 00077 'contextlevel' => CONTEXT_MODULE, 00078 'archetypes' => array( 00079 'student' => CAP_ALLOW, 00080 'editingteacher' => CAP_ALLOW, 00081 'manager' => CAP_ALLOW 00082 ) 00083 ), 00084 00085 'mod/feedback:deletesubmissions' => array( 00086 00087 'captype' => 'write', 00088 'contextlevel' => CONTEXT_MODULE, 00089 'archetypes' => array( 00090 'editingteacher' => CAP_ALLOW, 00091 'manager' => CAP_ALLOW 00092 ) 00093 ), 00094 00095 'mod/feedback:mapcourse' => array( 00096 00097 'captype' => 'write', 00098 'contextlevel' => CONTEXT_MODULE, 00099 'archetypes' => array( 00100 'manager' => CAP_ALLOW 00101 ) 00102 ), 00103 00104 'mod/feedback:edititems' => array( 00105 00106 'riskbitmask' => RISK_SPAM | RISK_XSS, 00107 00108 'captype' => 'write', 00109 'contextlevel' => CONTEXT_MODULE, 00110 'archetypes' => array( 00111 'editingteacher' => CAP_ALLOW, 00112 'manager' => CAP_ALLOW 00113 ) 00114 ), 00115 00116 'mod/feedback:createprivatetemplate' => array( 00117 00118 'riskbitmask' => RISK_SPAM, 00119 00120 'captype' => 'write', 00121 'contextlevel' => CONTEXT_MODULE, 00122 'archetypes' => array( 00123 'editingteacher' => CAP_ALLOW, 00124 'manager' => CAP_ALLOW 00125 ) 00126 ), 00127 00128 'mod/feedback:createpublictemplate' => array( 00129 00130 'riskbitmask' => RISK_SPAM, 00131 00132 'captype' => 'write', 00133 'contextlevel' => CONTEXT_MODULE, 00134 'archetypes' => array( 00135 'editingteacher' => CAP_ALLOW, 00136 'manager' => CAP_ALLOW 00137 ) 00138 ), 00139 00140 'mod/feedback:deletetemplate' => array( 00141 00142 'captype' => 'write', 00143 'contextlevel' => CONTEXT_MODULE, 00144 'archetypes' => array( 00145 'editingteacher' => CAP_ALLOW, 00146 'manager' => CAP_ALLOW 00147 ) 00148 ), 00149 00150 'mod/feedback:viewreports' => array( 00151 00152 'riskbitmask' => RISK_PERSONAL, 00153 00154 'captype' => 'read', 00155 'contextlevel' => CONTEXT_MODULE, 00156 'archetypes' => array( 00157 'teacher' => CAP_ALLOW, 00158 'editingteacher' => CAP_ALLOW, 00159 'manager' => CAP_ALLOW 00160 ) 00161 ), 00162 00163 'mod/feedback:receivemail' => array( 00164 00165 'riskbitmask' => RISK_PERSONAL, 00166 00167 'captype' => 'read', 00168 'contextlevel' => CONTEXT_MODULE, 00169 'archetypes' => array( 00170 'teacher' => CAP_ALLOW, 00171 'editingteacher' => CAP_ALLOW 00172 ) 00173 ), 00174 00175 ); 00176 00177