Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
// This file is part of the customcert module for Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
/**
18
 * Customcert module capability definition
19
 *
20
 * @package    mod_customcert
21
 * @copyright  2013 Mark Nelson <markn@moodle.com>
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 */
24
 
25
defined('MOODLE_INTERNAL') || die();
26
 
27
$capabilities = [
28
 
29
    'mod/customcert:addinstance' => [
30
        'riskbitmask' => RISK_XSS,
31
        'captype' => 'write',
32
        'contextlevel' => CONTEXT_COURSE,
33
        'archetypes' => [
34
            'editingteacher' => CAP_ALLOW,
35
            'manager' => CAP_ALLOW,
36
        ],
37
        'clonepermissionsfrom' => 'moodle/course:manageactivities',
38
    ],
39
 
40
    'mod/customcert:view' => [
41
 
42
        'captype' => 'read',
43
        'contextlevel' => CONTEXT_MODULE,
44
        'archetypes' => [
45
            'student' => CAP_ALLOW,
46
            'teacher' => CAP_ALLOW,
47
            'editingteacher' => CAP_ALLOW,
48
            'manager' => CAP_ALLOW,
49
        ],
50
    ],
51
 
52
    'mod/customcert:manage' => [
53
 
54
        'captype' => 'write',
55
        'contextlevel' => CONTEXT_MODULE,
56
        'archetypes' => [
57
            'editingteacher' => CAP_ALLOW,
58
            'manager' => CAP_ALLOW,
59
        ],
60
    ],
61
 
62
    'mod/customcert:receiveissue' => [
63
        'captype' => 'read',
64
        'contextlevel' => CONTEXT_MODULE,
65
        'archetypes' => [
66
            'student' => CAP_ALLOW,
67
        ],
68
    ],
69
 
70
    'mod/customcert:viewreport' => [
71
 
72
        'captype' => 'read',
73
        'contextlevel' => CONTEXT_MODULE,
74
        'archetypes' => [
75
            'teacher' => CAP_ALLOW,
76
            'editingteacher' => CAP_ALLOW,
77
            'manager' => CAP_ALLOW,
78
        ],
79
    ],
80
 
81
    'mod/customcert:viewallcertificates' => [
82
        'captype' => 'read',
83
        'contextlevel' => CONTEXT_SYSTEM,
84
        'archetypes' => [
85
            'manager' => CAP_ALLOW,
86
        ],
87
    ],
88
 
89
    'mod/customcert:verifycertificate' => [
90
        'captype' => 'read',
91
        'contextlevel' => CONTEXT_MODULE,
92
        'archetypes' => [
93
            'teacher' => CAP_ALLOW,
94
            'editingteacher' => CAP_ALLOW,
95
            'manager' => CAP_ALLOW,
96
        ],
97
    ],
98
 
99
    'mod/customcert:verifyallcertificates' => [
100
        'captype' => 'read',
101
        'contextlevel' => CONTEXT_SYSTEM,
102
        'archetypes' => [
103
            'manager' => CAP_ALLOW,
104
        ],
105
    ],
106
 
107
    'mod/customcert:manageemailstudents' => [
108
        'captype' => 'write',
109
        'contextlevel' => CONTEXT_COURSE,
110
        'archetypes' => [
111
            'editingteacher' => CAP_ALLOW,
112
            'manager' => CAP_ALLOW,
113
        ],
114
        'clonepermissionsfrom' => 'moodle/course:manageactivities',
115
    ],
116
 
117
    'mod/customcert:manageemailteachers' => [
118
        'captype' => 'write',
119
        'contextlevel' => CONTEXT_COURSE,
120
        'archetypes' => [
121
            'editingteacher' => CAP_ALLOW,
122
            'manager' => CAP_ALLOW,
123
        ],
124
        'clonepermissionsfrom' => 'moodle/course:manageactivities',
125
    ],
126
 
127
    'mod/customcert:manageemailothers' => [
128
        'captype' => 'write',
129
        'contextlevel' => CONTEXT_COURSE,
130
        'archetypes' => [
131
            'editingteacher' => CAP_ALLOW,
132
            'manager' => CAP_ALLOW,
133
        ],
134
        'clonepermissionsfrom' => 'moodle/course:manageactivities',
135
    ],
136
 
137
    'mod/customcert:manageverifyany' => [
138
        'captype' => 'write',
139
        'contextlevel' => CONTEXT_COURSE,
140
        'archetypes' => [
141
            'editingteacher' => CAP_ALLOW,
142
            'manager' => CAP_ALLOW,
143
        ],
144
        'clonepermissionsfrom' => 'moodle/course:manageactivities',
145
    ],
146
 
147
    'mod/customcert:managerequiredtime' => [
148
        'captype' => 'write',
149
        'contextlevel' => CONTEXT_COURSE,
150
        'archetypes' => [
151
            'editingteacher' => CAP_ALLOW,
152
            'manager' => CAP_ALLOW,
153
        ],
154
        'clonepermissionsfrom' => 'moodle/course:manageactivities',
155
    ],
156
 
157
    'mod/customcert:manageprotection' => [
158
        'captype' => 'write',
159
        'contextlevel' => CONTEXT_COURSE,
160
        'archetypes' => [
161
            'editingteacher' => CAP_ALLOW,
162
            'manager' => CAP_ALLOW,
163
        ],
164
        'clonepermissionsfrom' => 'moodle/course:manageactivities',
165
    ],
166
 
167
    'mod/customcert:managelanguages' => [
168
        'captype' => 'write',
169
        'contextlevel' => CONTEXT_COURSE,
170
        'archetypes' => [
171
            'editingteacher' => CAP_ALLOW,
172
            'manager' => CAP_ALLOW,
173
        ],
174
        'clonepermissionsfrom' => 'moodle/course:manageactivities',
175
    ],
176
];