MDL-11082 Improved groups upgrade performance 1.8x -> 1.9; thanks Eloy for telling...
[moodle-pu.git] / mod / glossary / db / access.php
blobb00f92691adbc7cb63b7dfa2a2bcbc95248aaa3b
1 <?php
2 //
3 // Capability definitions for the glossary module.
4 //
5 // The capabilities are loaded into the database table when the module is
6 // installed or updated. Whenever the capability definitions are updated,
7 // the module version number should be bumped up.
8 //
9 // The system has four possible values for a capability:
10 // CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set).
13 // CAPABILITY NAMING CONVENTION
15 // It is important that capability names are unique. The naming convention
16 // for capabilities that are specific to modules and blocks is as follows:
17 // [mod/block]/<component_name>:<capabilityname>
19 // component_name should be the same as the directory name of the mod or block.
21 // Core moodle capabilities are defined thus:
22 // moodle/<capabilityclass>:<capabilityname>
24 // Examples: mod/forum:viewpost
25 // block/recent_activity:view
26 // moodle/site:deleteuser
28 // The variable name for the capability definitions array follows the format
29 // $<componenttype>_<component_name>_capabilities
31 // For the core capabilities, the variable is $moodle_capabilities.
34 $mod_glossary_capabilities = array(
36 'mod/glossary:write' => array(
38 'riskbitmask' => RISK_SPAM,
40 'captype' => 'write',
41 'contextlevel' => CONTEXT_MODULE,
42 'legacy' => array(
43 'student' => CAP_ALLOW,
44 'teacher' => CAP_ALLOW,
45 'editingteacher' => CAP_ALLOW,
46 'admin' => CAP_ALLOW
50 'mod/glossary:manageentries' => array(
52 'riskbitmask' => RISK_SPAM,
54 'captype' => 'write',
55 'contextlevel' => CONTEXT_MODULE,
56 'legacy' => array(
57 'teacher' => CAP_ALLOW,
58 'editingteacher' => CAP_ALLOW,
59 'admin' => CAP_ALLOW
63 'mod/glossary:managecategories' => array(
65 'riskbitmask' => RISK_SPAM,
67 'captype' => 'write',
68 'contextlevel' => CONTEXT_MODULE,
69 'legacy' => array(
70 'teacher' => CAP_ALLOW,
71 'editingteacher' => CAP_ALLOW,
72 'admin' => CAP_ALLOW
76 'mod/glossary:comment' => array(
78 'riskbitmask' => RISK_SPAM,
80 'captype' => 'write',
81 'contextlevel' => CONTEXT_MODULE,
82 'legacy' => array(
83 'student' => CAP_ALLOW,
84 'teacher' => CAP_ALLOW,
85 'editingteacher' => CAP_ALLOW,
86 'admin' => CAP_ALLOW
90 'mod/glossary:managecomments' => array(
92 'riskbitmask' => RISK_SPAM,
94 'captype' => 'write',
95 'contextlevel' => CONTEXT_MODULE,
96 'legacy' => array(
97 'teacher' => CAP_ALLOW,
98 'editingteacher' => CAP_ALLOW,
99 'admin' => CAP_ALLOW
103 'mod/glossary:import' => array(
105 'riskbitmask' => RISK_SPAM,
107 'captype' => 'write',
108 'contextlevel' => CONTEXT_MODULE,
109 'legacy' => array(
110 'teacher' => CAP_ALLOW,
111 'editingteacher' => CAP_ALLOW,
112 'admin' => CAP_ALLOW
116 'mod/glossary:export' => array(
118 'captype' => 'read',
119 'contextlevel' => CONTEXT_MODULE,
120 'legacy' => array(
121 'teacher' => CAP_ALLOW,
122 'editingteacher' => CAP_ALLOW,
123 'admin' => CAP_ALLOW
127 'mod/glossary:approve' => array(
129 'riskbitmask' => RISK_SPAM,
131 'captype' => 'write',
132 'contextlevel' => CONTEXT_MODULE,
133 'legacy' => array(
134 'teacher' => CAP_ALLOW,
135 'editingteacher' => CAP_ALLOW,
136 'admin' => CAP_ALLOW
140 'mod/glossary:rate' => array(
142 'captype' => 'write',
143 'contextlevel' => CONTEXT_MODULE,
144 'legacy' => array(
145 'teacher' => CAP_ALLOW,
146 'editingteacher' => CAP_ALLOW,
147 'admin' => CAP_ALLOW
151 'mod/glossary:viewrating' => array(
153 'captype' => 'read',
154 'contextlevel' => CONTEXT_MODULE,
155 'legacy' => array(
156 'teacher' => CAP_ALLOW,
157 'editingteacher' => CAP_ALLOW,
158 'admin' => CAP_ALLOW