MDL-11082 Improved groups upgrade performance 1.8x -> 1.9; thanks Eloy for telling...
[moodle-pu.git] / mod / choice / db / access.php
bloba75fc9ec6796b9b1f785bf5510139da895e46b6a
1 <?php
2 //
3 // Capability definitions for the choice 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_choice_capabilities = array(
36 'mod/choice:choose' => array(
38 'captype' => 'write',
39 'contextlevel' => CONTEXT_MODULE,
40 'legacy' => array(
41 'student' => CAP_ALLOW,
42 'teacher' => CAP_ALLOW,
43 'editingteacher' => CAP_ALLOW,
44 'admin' => CAP_ALLOW
48 'mod/choice:readresponses' => array(
50 'captype' => 'read',
51 'contextlevel' => CONTEXT_MODULE,
52 'legacy' => array(
53 'teacher' => CAP_ALLOW,
54 'editingteacher' => CAP_ALLOW,
55 'admin' => CAP_ALLOW
59 'mod/choice:deleteresponses' => array(
61 'captype' => 'write',
62 'contextlevel' => CONTEXT_MODULE,
63 'legacy' => array(
64 'teacher' => CAP_ALLOW,
65 'editingteacher' => CAP_ALLOW,
66 'admin' => CAP_ALLOW
70 'mod/choice:downloadresponses' => array(
72 'captype' => 'read',
73 'contextlevel' => CONTEXT_MODULE,
74 'legacy' => array(
75 'teacher' => CAP_ALLOW,
76 'editingteacher' => CAP_ALLOW,
77 'admin' => CAP_ALLOW