MDL-16221
[moodle-linuxchix.git] / mod / quiz / db / access.php
blob9d5adbb8162e329550e3efdfef46fd0b1bf06c4b
1 <?php // $Id$
2 /**
3 * Capability definitions for the quiz module.
5 * For naming conventions, see lib/db/access.php.
6 */
7 $mod_quiz_capabilities = array(
9 // Ability to see that the quiz exists, and the basic information
10 // about it, for example the start date and time limit.
11 'mod/quiz:view' => array(
12 'captype' => 'read',
13 'contextlevel' => CONTEXT_MODULE,
14 'legacy' => array(
15 'guest' => CAP_ALLOW,
16 'student' => CAP_ALLOW,
17 'teacher' => CAP_ALLOW,
18 'editingteacher' => CAP_ALLOW,
19 'admin' => CAP_ALLOW
23 // Ability to do the quiz as a 'student'.
24 'mod/quiz:attempt' => array(
25 'captype' => 'write',
26 'contextlevel' => CONTEXT_MODULE,
27 'legacy' => array(
28 'student' => CAP_ALLOW
32 // Edit the quiz settings, add and remove questions.
33 'mod/quiz:manage' => array(
34 'riskbitmask' => RISK_SPAM,
35 'captype' => 'write',
36 'contextlevel' => CONTEXT_MODULE,
37 'legacy' => array(
38 'editingteacher' => CAP_ALLOW,
39 'admin' => CAP_ALLOW
43 // Preview the quiz.
44 'mod/quiz:preview' => array(
45 'captype' => 'write', // Only just a write.
46 'contextlevel' => CONTEXT_MODULE,
47 'legacy' => array(
48 'teacher' => CAP_ALLOW,
49 'editingteacher' => CAP_ALLOW,
50 'admin' => CAP_ALLOW
54 // Manually grade and comment on student attempts at a question, and regrade quizzes.
55 'mod/quiz:grade' => array(
56 'riskbitmask' => RISK_SPAM | RISK_XSS,
57 'captype' => 'write',
58 'contextlevel' => CONTEXT_MODULE,
59 'legacy' => array(
60 'teacher' => CAP_ALLOW,
61 'editingteacher' => CAP_ALLOW,
62 'admin' => CAP_ALLOW
66 // View the quiz reports.
67 'mod/quiz:viewreports' => array(
68 'riskbitmask' => RISK_PERSONAL,
69 'captype' => 'read',
70 'contextlevel' => CONTEXT_MODULE,
71 'legacy' => array(
72 'teacher' => CAP_ALLOW,
73 'editingteacher' => CAP_ALLOW,
74 'admin' => CAP_ALLOW
78 // Delete attempts using the overview report.
79 'mod/quiz:deleteattempts' => array(
80 'riskbitmask' => RISK_DATALOSS,
81 'captype' => 'write',
82 'contextlevel' => CONTEXT_MODULE,
83 'legacy' => array(
84 'editingteacher' => CAP_ALLOW,
85 'admin' => CAP_ALLOW
89 // Do not have the time limit imposed. Used for accessibility legislation compliance.
90 'mod/quiz:ignoretimelimits' => array(
91 'captype' => 'read',
92 'contextlevel' => CONTEXT_MODULE,
93 'legacy' => array()
96 // Receive email confirmation of own quiz submission
97 'mod/quiz:emailconfirmsubmission' => array(
98 'captype' => 'read',
99 'contextlevel' => CONTEXT_MODULE,
100 'legacy' => array()
103 // Receive email notification of other peoples quiz submissions
104 'mod/quiz:emailnotifysubmission' => array(
105 'captype' => 'read',
106 'contextlevel' => CONTEXT_MODULE,
107 'legacy' => array()