3 * Capability definitions for the quiz module.
5 * For naming conventions, see lib/db/access.php.
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(
14 'contextlevel' => CONTEXT_MODULE
,
17 'student' => CAP_ALLOW
,
18 'teacher' => CAP_ALLOW
,
19 'editingteacher' => CAP_ALLOW
,
24 // Ability to do the quiz as a 'student'.
25 'mod/quiz:attempt' => array(
28 'contextlevel' => CONTEXT_MODULE
,
30 'student' => CAP_ALLOW
34 // Edit the quiz settings, add and remove questions.
35 'mod/quiz:manage' => array(
38 'contextlevel' => CONTEXT_MODULE
,
40 'editingteacher' => CAP_ALLOW
,
46 'mod/quiz:preview' => array(
48 'captype' => 'write', // Only just a write.
49 'contextlevel' => CONTEXT_MODULE
,
51 'teacher' => CAP_ALLOW
,
52 'editingteacher' => CAP_ALLOW
,
57 // Manually grade and comment on student attempts at a question.
58 'mod/quiz:grade' => array(
61 'contextlevel' => CONTEXT_MODULE
,
63 'teacher' => CAP_ALLOW
,
64 'editingteacher' => CAP_ALLOW
,
69 // View the quiz reports.
70 'mod/quiz:viewreports' => array(
73 'contextlevel' => CONTEXT_MODULE
,
75 'teacher' => CAP_ALLOW
,
76 'editingteacher' => CAP_ALLOW
,
81 // Delete attempts using the overview report.
82 'mod/quiz:deleteattempts' => array(
85 'contextlevel' => CONTEXT_MODULE
,
87 'editingteacher' => CAP_ALLOW
,
92 'mod/quiz:ignoretimelimits' => array(
94 'contextlevel' => CONTEXT_MODULE
,
98 // Receive email confirmation of own quiz submission
99 'mod/quiz:emailconfirmsubmission' => array(
102 'contextlevel' => CONTEXT_MODULE
,
106 // Receive email notification of other peoples quiz submissions
107 'mod/quiz:emailnotifysubmission' => array(
110 'contextlevel' => CONTEXT_MODULE
,