Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / mod / quiz / db / access.php
blob251ec22e1c08d6b244346d184a79fd5832a82184
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(
13 'captype' => 'read',
14 'contextlevel' => CONTEXT_MODULE,
15 'legacy' => array(
16 'guest' => CAP_ALLOW,
17 'student' => CAP_ALLOW,
18 'teacher' => CAP_ALLOW,
19 'editingteacher' => CAP_ALLOW,
20 'admin' => CAP_ALLOW
24 // Ability to do the quiz as a 'student'.
25 'mod/quiz:attempt' => array(
27 'captype' => 'write',
28 'contextlevel' => CONTEXT_MODULE,
29 'legacy' => array(
30 'student' => CAP_ALLOW
34 // Edit the quiz settings, add and remove questions.
35 'mod/quiz:manage' => array(
37 'captype' => 'write',
38 'contextlevel' => CONTEXT_MODULE,
39 'legacy' => array(
40 'editingteacher' => CAP_ALLOW,
41 'admin' => CAP_ALLOW
45 // Preview the quiz.
46 'mod/quiz:preview' => array(
48 'captype' => 'write', // Only just a write.
49 'contextlevel' => CONTEXT_MODULE,
50 'legacy' => array(
51 'teacher' => CAP_ALLOW,
52 'editingteacher' => CAP_ALLOW,
53 'admin' => CAP_ALLOW
57 // Manually grade and comment on student attempts at a question.
58 'mod/quiz:grade' => array(
60 'captype' => 'write',
61 'contextlevel' => CONTEXT_MODULE,
62 'legacy' => array(
63 'teacher' => CAP_ALLOW,
64 'editingteacher' => CAP_ALLOW,
65 'admin' => CAP_ALLOW
69 // View the quiz reports.
70 'mod/quiz:viewreports' => array(
72 'captype' => 'read',
73 'contextlevel' => CONTEXT_MODULE,
74 'legacy' => array(
75 'teacher' => CAP_ALLOW,
76 'editingteacher' => CAP_ALLOW,
77 'admin' => CAP_ALLOW
81 // Delete attempts using the overview report.
82 'mod/quiz:deleteattempts' => array(
84 'captype' => 'write',
85 'contextlevel' => CONTEXT_MODULE,
86 'legacy' => array(
87 'editingteacher' => CAP_ALLOW,
88 'admin' => CAP_ALLOW
92 'mod/quiz:ignoretimelimits' => array(
93 'captype' => 'read',
94 'contextlevel' => CONTEXT_MODULE,
95 'legacy' => array()
98 // Receive email confirmation of own quiz submission
99 'mod/quiz:emailconfirmsubmission' => array(
101 'captype' => 'read',
102 'contextlevel' => CONTEXT_MODULE,
103 'legacy' => array()
106 // Receive email notification of other peoples quiz submissions
107 'mod/quiz:emailnotifysubmission' => array(
109 'captype' => 'read',
110 'contextlevel' => CONTEXT_MODULE,
111 'legacy' => array()