lib-db-access MDL-25672 editingteacher can no longer delete courses by default.
[moodle.git] / lib / db / access.php
CommitLineData
117bd748 1<?php
5b4a78e2
PS
2
3// This file is part of Moodle - http://moodle.org/
bbbf2d40 4//
5b4a78e2
PS
5// Moodle is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
bbbf2d40 9//
5b4a78e2
PS
10// Moodle is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
bbbf2d40 14//
5b4a78e2
PS
15// You should have received a copy of the GNU General Public License
16// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
17
18/**
19 * Capability definitions for Moodle core.
20 *
21 * The capabilities are loaded into the database table when the module is
22 * installed or updated. Whenever the capability definitions are updated,
23 * the module version number should be bumped up.
24 *
25 * The system has four possible values for a capability:
26 * CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set).
27 *
28 *
29 * CAPABILITY NAMING CONVENTION
30 *
31 * It is important that capability names are unique. The naming convention
32 * for capabilities that are specific to modules and blocks is as follows:
33 * [mod/block]/<plugin_name>:<capabilityname>
34 *
35 * component_name should be the same as the directory name of the mod or block.
36 *
37 * Core moodle capabilities are defined thus:
38 * moodle/<capabilityclass>:<capabilityname>
39 *
40 * Examples: mod/forum:viewpost
41 * block/recent_activity:view
42 * moodle/site:deleteuser
43 *
44 * The variable name for the capability definitions array is $capabilities
45 *
46 * @package core
47 * @subpackage role
48 * @copyright 2006 onwards Martin Dougiamas http://dougiamas.com
49 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
50 */
bbbf2d40 51
5b4a78e2 52defined('MOODLE_INTERNAL') || die();
bbbf2d40 53
0ac940b3 54$capabilities = array(
bbbf2d40 55 'moodle/site:config' => array(
eef868d1 56
f432bebf 57 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS,
21b6db6e 58
bbbf2d40 59 'captype' => 'write',
60 'contextlevel' => CONTEXT_SYSTEM,
31c93303 61 'archetypes' => array(
bbbf2d40 62 )
63 ),
eef868d1 64
51792df0 65 'moodle/site:readallmessages' => array(
eef868d1 66
bcdb0f19 67 'riskbitmask' => RISK_PERSONAL,
68
51792df0 69 'captype' => 'read',
70 'contextlevel' => CONTEXT_SYSTEM,
31c93303 71 'archetypes' => array(
4f0c2d00 72 'manager' => CAP_ALLOW,
4b7ae3c4 73 'editingteacher' => CAP_ALLOW
51792df0 74 )
75 ),
f7c0d84b 76
576ad290 77 'moodle/site:sendmessage' => array(
78
3a0c6cca 79 'riskbitmask' => RISK_SPAM,
576ad290 80
81 'captype' => 'write',
82 'contextlevel' => CONTEXT_SYSTEM,
31c93303 83 'archetypes' => array(
4f0c2d00 84 'manager' => CAP_ALLOW,
576ad290 85 'user' => CAP_ALLOW
86 )
f7c0d84b 87 ),
eef868d1 88
51792df0 89 'moodle/site:approvecourse' => array(
eef868d1 90
bcdb0f19 91 'riskbitmask' => RISK_XSS,
92
51792df0 93 'captype' => 'write',
94 'contextlevel' => CONTEXT_SYSTEM,
31c93303 95 'archetypes' => array(
4f0c2d00 96 'manager' => CAP_ALLOW
51792df0 97 )
98 ),
eef868d1 99
d2940003 100 'moodle/backup:backupcourse' => array(
eef868d1 101
21b6db6e 102 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
103
bbbf2d40 104 'captype' => 'write',
f432bebf 105 'contextlevel' => CONTEXT_COURSE,
31c93303 106 'archetypes' => array(
7246585a 107 'editingteacher' => CAP_ALLOW,
4f0c2d00 108 'manager' => CAP_ALLOW
d2940003
EL
109 ),
110
111 'clonepermissionsfrom' => 'moodle/site:backup'
bbbf2d40 112 ),
eef868d1 113
57ca97b3
EL
114 'moodle/backup:backupsection' => array(
115
116 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
117
118 'captype' => 'write',
119 'contextlevel' => CONTEXT_COURSE,
31c93303 120 'archetypes' => array(
57ca97b3
EL
121 'editingteacher' => CAP_ALLOW,
122 'manager' => CAP_ALLOW
123 ),
124
125 'clonepermissionsfrom' => 'moodle/backup:backupcourse'
126 ),
127
128 'moodle/backup:backupactivity' => array(
129
130 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
131
132 'captype' => 'write',
133 'contextlevel' => CONTEXT_MODULE,
31c93303 134 'archetypes' => array(
57ca97b3
EL
135 'editingteacher' => CAP_ALLOW,
136 'manager' => CAP_ALLOW
137 ),
138
139 'clonepermissionsfrom' => 'moodle/backup:backupcourse'
140 ),
141
142 'moodle/backup:backuptargethub' => array(
143
144 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
145
146 'captype' => 'write',
147 'contextlevel' => CONTEXT_COURSE,
31c93303 148 'archetypes' => array(
57ca97b3
EL
149 'editingteacher' => CAP_ALLOW,
150 'manager' => CAP_ALLOW
151 ),
152
153 'clonepermissionsfrom' => 'moodle/backup:backupcourse'
154 ),
155
156 'moodle/backup:backuptargetimport' => array(
157
158 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
159
160 'captype' => 'write',
161 'contextlevel' => CONTEXT_COURSE,
31c93303 162 'archetypes' => array(
57ca97b3
EL
163 'editingteacher' => CAP_ALLOW,
164 'manager' => CAP_ALLOW
165 ),
166
167 'clonepermissionsfrom' => 'moodle/backup:backupcourse'
168 ),
169
2fdde5d1 170 'moodle/backup:downloadfile' => array(
172dd12c 171
172 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
173
174 'captype' => 'write',
175 'contextlevel' => CONTEXT_COURSE,
31c93303 176 'archetypes' => array(
172dd12c 177 'editingteacher' => CAP_ALLOW,
4f0c2d00 178 'manager' => CAP_ALLOW
172dd12c 179 ),
180
2fdde5d1 181 'clonepermissionsfrom' => 'moodle/site:backupdownload'
172dd12c 182 ),
183
57ca97b3
EL
184 'moodle/backup:configure' => array(
185
186 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
187
188 'captype' => 'write',
189 'contextlevel' => CONTEXT_COURSE,
31c93303 190 'archetypes' => array(
57ca97b3
EL
191 'editingteacher' => CAP_ALLOW,
192 'manager' => CAP_ALLOW
193 )
194 ),
195
2fdde5d1 196 'moodle/backup:userinfo' => array(
172dd12c 197
2fdde5d1 198 'riskbitmask' => RISK_PERSONAL,
172dd12c 199
2fdde5d1 200 'captype' => 'read',
172dd12c 201 'contextlevel' => CONTEXT_COURSE,
31c93303 202 'archetypes' => array(
4f0c2d00 203 'manager' => CAP_ALLOW
2fdde5d1 204 )
172dd12c 205 ),
206
57ca97b3
EL
207 'moodle/backup:anonymise' => array(
208
209 'riskbitmask' => RISK_PERSONAL,
210
211 'captype' => 'read',
212 'contextlevel' => CONTEXT_COURSE,
31c93303 213 'archetypes' => array(
57ca97b3
EL
214 'manager' => CAP_ALLOW
215 )
216 ),
217
2fdde5d1 218 'moodle/restore:restorecourse' => array(
f2a0da6c 219
2fdde5d1 220 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
f2a0da6c 221
2fdde5d1 222 'captype' => 'write',
f2a0da6c 223 'contextlevel' => CONTEXT_COURSE,
31c93303 224 'archetypes' => array(
2fdde5d1 225 'editingteacher' => CAP_ALLOW,
4f0c2d00 226 'manager' => CAP_ALLOW
2fdde5d1
EL
227 ),
228
229 'clonepermissionsfrom' => 'moodle/site:restore'
f2a0da6c
EL
230 ),
231
57ca97b3
EL
232 'moodle/restore:restoresection' => array(
233
234 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
235
236 'captype' => 'write',
237 'contextlevel' => CONTEXT_COURSE,
31c93303 238 'archetypes' => array(
57ca97b3
EL
239 'editingteacher' => CAP_ALLOW,
240 'manager' => CAP_ALLOW
241 ),
242
243 'clonepermissionsfrom' => 'moodle/restore:restorecourse'
244 ),
245
246 'moodle/restore:restoreactivity' => array(
247
248 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
249
250 'captype' => 'write',
7efd488e 251 'contextlevel' => CONTEXT_COURSE,
31c93303 252 'archetypes' => array(
57ca97b3
EL
253 'editingteacher' => CAP_ALLOW,
254 'manager' => CAP_ALLOW
255 ),
256
257 'clonepermissionsfrom' => 'moodle/restore:restorecourse'
258 ),
259
bac233d3
SH
260 'moodle/restore:viewautomatedfilearea' => array(
261
262 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
263
264 'captype' => 'write',
265 'contextlevel' => CONTEXT_COURSE,
266 ),
267
57ca97b3
EL
268 'moodle/restore:restoretargethub' => array(
269
270 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
271
272 'captype' => 'write',
273 'contextlevel' => CONTEXT_COURSE,
31c93303 274 'archetypes' => array(
57ca97b3
EL
275 'editingteacher' => CAP_ALLOW,
276 'manager' => CAP_ALLOW
277 ),
278
279 'clonepermissionsfrom' => 'moodle/restore:restorecourse'
280 ),
281
157aa3a2 282 'moodle/restore:restoretargetimport' => array(
eef868d1 283
21b6db6e 284 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
285
bbbf2d40 286 'captype' => 'write',
f432bebf 287 'contextlevel' => CONTEXT_COURSE,
31c93303 288 'archetypes' => array(
7246585a 289 'editingteacher' => CAP_ALLOW,
4f0c2d00 290 'manager' => CAP_ALLOW
d2940003
EL
291 ),
292
157aa3a2 293 'clonepermissionsfrom' => 'moodle/site:import'
bbbf2d40 294 ),
eef868d1 295
157aa3a2 296 'moodle/restore:uploadfile' => array(
5e934890 297
157aa3a2 298 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
5e934890
EL
299
300 'captype' => 'write',
157aa3a2 301 'contextlevel' => CONTEXT_COURSE,
31c93303 302 'archetypes' => array(
157aa3a2 303 'editingteacher' => CAP_ALLOW,
4f0c2d00 304 'manager' => CAP_ALLOW
157aa3a2
EL
305 ),
306
307 'clonepermissionsfrom' => 'moodle/site:backupupload'
5e934890
EL
308 ),
309
57ca97b3 310 'moodle/restore:configure' => array(
f6459d12 311
57ca97b3 312 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
f6459d12
EL
313
314 'captype' => 'write',
315 'contextlevel' => CONTEXT_COURSE,
31c93303 316 'archetypes' => array(
57ca97b3 317 'editingteacher' => CAP_ALLOW,
4f0c2d00 318 'manager' => CAP_ALLOW
f6459d12
EL
319 )
320 ),
321
57ca97b3 322 'moodle/restore:rolldates' => array(
157aa3a2
EL
323
324 'captype' => 'write',
57ca97b3 325 'contextlevel' => CONTEXT_COURSE,
31c93303 326 'archetypes' => array(
57ca97b3 327 'coursecreator' => CAP_ALLOW,
4f0c2d00 328 'manager' => CAP_ALLOW
157aa3a2
EL
329 )
330 ),
331
57ca97b3
EL
332 'moodle/restore:userinfo' => array(
333
334 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
982e45af 335
336 'captype' => 'write',
337 'contextlevel' => CONTEXT_COURSE,
31c93303 338 'archetypes' => array(
57ca97b3
EL
339 'manager' => CAP_ALLOW
340 )
341 ),
342
343 'moodle/restore:createuser' => array(
344
345 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
346
347 'captype' => 'write',
348 'contextlevel' => CONTEXT_SYSTEM,
31c93303 349 'archetypes' => array(
4f0c2d00 350 'manager' => CAP_ALLOW
982e45af 351 )
352 ),
353
bbbf2d40 354 'moodle/site:manageblocks' => array(
eef868d1 355
21b6db6e 356 'riskbitmask' => RISK_SPAM | RISK_XSS,
357
bbbf2d40 358 'captype' => 'write',
f432bebf 359 'contextlevel' => CONTEXT_BLOCK,
31c93303 360 'archetypes' => array(
73b73d21 361 'editingteacher' => CAP_ALLOW,
4f0c2d00 362 'manager' => CAP_ALLOW
bbbf2d40 363 )
364 ),
eef868d1 365
27950688 366 'moodle/site:accessallgroups' => array(
eef868d1 367
27950688 368 'captype' => 'read',
f432bebf 369 'contextlevel' => CONTEXT_COURSE,
31c93303 370 'archetypes' => array(
27950688 371 'teacher' => CAP_ALLOW,
372 'editingteacher' => CAP_ALLOW,
4f0c2d00 373 'manager' => CAP_ALLOW
27950688 374 )
375 ),
eef868d1 376
53d7785b 377 'moodle/site:viewfullnames' => array(
eef868d1 378
53d7785b 379 'captype' => 'read',
f432bebf 380 'contextlevel' => CONTEXT_COURSE,
31c93303 381 'archetypes' => array(
53d7785b 382 'teacher' => CAP_ALLOW,
383 'editingteacher' => CAP_ALLOW,
4f0c2d00 384 'manager' => CAP_ALLOW
53d7785b 385 )
386 ),
eef868d1 387
a028c291 388 'moodle/site:viewreports' => array(
eef868d1 389
21b6db6e 390 'riskbitmask' => RISK_PERSONAL,
391
a028c291 392 'captype' => 'read',
f432bebf 393 'contextlevel' => CONTEXT_COURSE,
31c93303 394 'archetypes' => array(
a028c291 395 'teacher' => CAP_ALLOW,
396 'editingteacher' => CAP_ALLOW,
4f0c2d00 397 'manager' => CAP_ALLOW
a028c291 398 )
399 ),
eef868d1 400
7d8a3cb0 401 'moodle/site:trustcontent' => array(
eef868d1 402
21b6db6e 403 'riskbitmask' => RISK_XSS,
404
7d8a3cb0 405 'captype' => 'write',
f432bebf 406 'contextlevel' => CONTEXT_COURSE,
31c93303 407 'archetypes' => array(
7d8a3cb0 408 'editingteacher' => CAP_ALLOW,
4f0c2d00 409 'manager' => CAP_ALLOW
7d8a3cb0 410 )
411 ),
eef868d1 412
6df3c7df 413 'moodle/site:uploadusers' => array(
eef868d1 414
21b6db6e 415 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
416
bbbf2d40 417 'captype' => 'write',
418 'contextlevel' => CONTEXT_SYSTEM,
31c93303 419 'archetypes' => array(
4f0c2d00 420 'manager' => CAP_ALLOW
bbbf2d40 421 )
422 ),
eef868d1 423
94211250 424 // Permission to manage filter setting overrides in subcontexts.
425 'moodle/filter:manage' => array(
426
427 'captype' => 'write',
428 'contextlevel' => CONTEXT_COURSE,
31c93303 429 'archetypes' => array(
94211250 430 'editingteacher' => CAP_ALLOW,
431 'coursecreator' => CAP_ALLOW,
4f0c2d00 432 'manager' => CAP_ALLOW,
94211250 433 )
434 ),
6df3c7df 435
436 'moodle/user:create' => array(
437
438 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
eef868d1 439
bbbf2d40 440 'captype' => 'write',
441 'contextlevel' => CONTEXT_SYSTEM,
31c93303 442 'archetypes' => array(
4f0c2d00 443 'manager' => CAP_ALLOW
bbbf2d40 444 )
445 ),
eef868d1 446
6df3c7df 447 'moodle/user:delete' => array(
cc891abe 448
3a0c6cca 449 'riskbitmask' => RISK_PERSONAL, RISK_DATALOSS,
bcdb0f19 450
cc891abe 451 'captype' => 'write',
452 'contextlevel' => CONTEXT_SYSTEM,
31c93303 453 'archetypes' => array(
4f0c2d00 454 'manager' => CAP_ALLOW
cc891abe 455 )
456 ),
457
6df3c7df 458 'moodle/user:update' => array(
cc891abe 459
460 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
21b6db6e 461
bbbf2d40 462 'captype' => 'write',
463 'contextlevel' => CONTEXT_SYSTEM,
31c93303 464 'archetypes' => array(
4f0c2d00 465 'manager' => CAP_ALLOW
bbbf2d40 466 )
467 ),
eef868d1 468
bbbf2d40 469 'moodle/user:viewdetails' => array(
eef868d1 470
e58eca72 471 'captype' => 'read',
f432bebf 472 'contextlevel' => CONTEXT_COURSE,
31c93303 473 'archetypes' => array(
22ae509e 474 'guest' => CAP_ALLOW,
475 'student' => CAP_ALLOW,
476 'teacher' => CAP_ALLOW,
477 'editingteacher' => CAP_ALLOW,
4f0c2d00 478 'manager' => CAP_ALLOW
bbbf2d40 479 )
480 ),
e58eca72 481
6d153e67 482 'moodle/user:viewalldetails' => array(
483 'riskbitmask' => RISK_PERSONAL,
484 'captype' => 'read',
485 'contextlevel' => CONTEXT_USER,
486 'archetypes' => array(
487 'manager' => CAP_ALLOW
488 ),
489 'clonepermissionsfrom' => 'moodle/user:update'
490 ),
491
e58eca72 492 'moodle/user:viewhiddendetails' => array(
eef868d1 493
21b6db6e 494 'riskbitmask' => RISK_PERSONAL,
495
e58eca72 496 'captype' => 'read',
f432bebf 497 'contextlevel' => CONTEXT_COURSE,
31c93303 498 'archetypes' => array(
e58eca72 499 'teacher' => CAP_ALLOW,
500 'editingteacher' => CAP_ALLOW,
4f0c2d00 501 'manager' => CAP_ALLOW
e58eca72 502 )
503 ),
eef868d1 504
6c95827f 505 'moodle/user:loginas' => array(
506
507 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
508
509 'captype' => 'write',
510 'contextlevel' => CONTEXT_COURSE,
31c93303 511 'archetypes' => array(
4f0c2d00 512 'manager' => CAP_ALLOW
6c95827f 513 )
514 ),
515
03d9401e
MD
516 // can the user manage the system default profile page?
517 'moodle/user:managesyspages' => array(
518
519 'riskbitmap' => RISK_SPAM | RISK_PERSONAL | RISK_CONFIG,
520
521 'captype' => 'write',
522 'contextlevel' => CONTEXT_SYSTEM,
31c93303 523 'archetypes' => array(
03d9401e
MD
524 'manager' => CAP_ALLOW
525 )
526 ),
527
528 // can the user manage another user's profile page?
529 'moodle/user:manageblocks' => array(
530
531 'riskbitmap' => RISK_SPAM | RISK_PERSONAL,
532
533 'captype' => 'write',
534 'contextlevel' => CONTEXT_USER
535 ),
536
537 // can the user manage their own profile page?
538 'moodle/user:manageownblocks' => array(
539
540 'riskbitmap' => RISK_SPAM | RISK_PERSONAL,
541
542 'captype' => 'write',
543 'contextlevel' => CONTEXT_SYSTEM,
31c93303 544 'archetypes' => array(
e4f413b4
MD
545 'user' => CAP_ALLOW
546 )
547 ),
548
549 // can the user manage their own files?
550 'moodle/user:manageownfiles' => array(
551
552 'riskbitmap' => RISK_SPAM | RISK_PERSONAL,
553
554 'captype' => 'write',
555 'contextlevel' => CONTEXT_SYSTEM,
556 'archetypes' => array(
557 'user' => CAP_ALLOW
03d9401e
MD
558 )
559 ),
560
561 // can the user manage the system default dashboard page?
562 'moodle/my:configsyspages' => array(
563
564 'riskbitmap' => RISK_SPAM | RISK_PERSONAL | RISK_CONFIG,
565
566 'captype' => 'write',
567 'contextlevel' => CONTEXT_SYSTEM,
31c93303 568 'archetypes' => array(
03d9401e
MD
569 'manager' => CAP_ALLOW
570 )
571 ),
572
bbbf2d40 573 'moodle/role:assign' => array(
eef868d1 574
3a0c6cca 575 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
576
bbbf2d40 577 'captype' => 'write',
f432bebf 578 'contextlevel' => CONTEXT_COURSE,
31c93303 579 'archetypes' => array(
861fdcaa 580 'editingteacher' => CAP_ALLOW,
4f0c2d00 581 'manager' => CAP_ALLOW
68c52526 582 )
583 ),
eef868d1 584
01a2ce80
PS
585 'moodle/role:review' => array(
586
587 'riskbitmask' => RISK_PERSONAL,
588
589 'captype' => 'read',
590 'contextlevel' => CONTEXT_COURSE,
31c93303 591 'archetypes' => array(
01a2ce80
PS
592 'teacher' => CAP_ALLOW,
593 'editingteacher' => CAP_ALLOW,
4f0c2d00 594 'manager' => CAP_ALLOW
01a2ce80
PS
595 )
596 ),
597
68c52526 598 'moodle/role:override' => array(
eef868d1 599
bcdb0f19 600 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
601
68c52526 602 'captype' => 'write',
f432bebf 603 'contextlevel' => CONTEXT_COURSE,
31c93303 604 'archetypes' => array(
4f0c2d00 605 'manager' => CAP_ALLOW
bbbf2d40 606 )
607 ),
eef868d1 608
3a0c6cca 609 'moodle/role:safeoverride' => array(
610
611 'riskbitmask' => RISK_SPAM,
612
613 'captype' => 'write',
f432bebf 614 'contextlevel' => CONTEXT_COURSE,
31c93303 615 'archetypes' => array(
3a0c6cca 616 'editingteacher' => CAP_ALLOW
617 )
618 ),
619
bbbf2d40 620 'moodle/role:manage' => array(
eef868d1 621
bcdb0f19 622 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
623
bbbf2d40 624 'captype' => 'write',
625 'contextlevel' => CONTEXT_SYSTEM,
31c93303 626 'archetypes' => array(
4f0c2d00 627 'manager' => CAP_ALLOW
bbbf2d40 628 )
629 ),
f43ce1ad 630
20dd4cf5 631 'moodle/role:switchroles' => array(
bcdb0f19 632
3a0c6cca 633 'riskbitmask' => RISK_XSS | RISK_PERSONAL,
bcdb0f19 634
20dd4cf5 635 'captype' => 'read',
f432bebf 636 'contextlevel' => CONTEXT_COURSE,
31c93303 637 'archetypes' => array(
20dd4cf5 638 'editingteacher' => CAP_ALLOW,
4f0c2d00 639 'manager' => CAP_ALLOW
20dd4cf5 640 )
641 ),
642
8ed5dd63 643 // Create, update and delete course categories. (Deleting a course category
644 // does not let you delete the courses it contains, unless you also have
645 // moodle/course: delete.) Creating and deleting requires this permission in
646 // the parent category.
647 'moodle/category:manage' => array(
eef868d1 648
89a792ab 649 'riskbitmask' => RISK_XSS,
650
bbbf2d40 651 'captype' => 'write',
652 'contextlevel' => CONTEXT_COURSECAT,
31c93303 653 'archetypes' => array(
4f0c2d00 654 'manager' => CAP_ALLOW
8ed5dd63 655 ),
656 'clonepermissionsfrom' => 'moodle/category:update'
bbbf2d40 657 ),
eef868d1 658
8ed5dd63 659 'moodle/category:viewhiddencategories' => array(
eef868d1 660
8ed5dd63 661 'captype' => 'read',
bbbf2d40 662 'contextlevel' => CONTEXT_COURSECAT,
31c93303 663 'archetypes' => array(
8ed5dd63 664 'coursecreator' => CAP_ALLOW,
4f0c2d00 665 'manager' => CAP_ALLOW
8ed5dd63 666 ),
667 'clonepermissionsfrom' => 'moodle/category:visibility'
bbbf2d40 668 ),
eef868d1 669
3f791403
PS
670 // create, delete, move cohorts in system and course categories,
671 // (cohorts with component !== null can be only moved)
672 'moodle/cohort:manage' => array(
673
674 'captype' => 'write',
675 'contextlevel' => CONTEXT_COURSECAT,
31c93303 676 'archetypes' => array(
3f791403
PS
677 'manager' => CAP_ALLOW
678 )
679 ),
680
681 // add and remove cohort members (only for cohorts where component !== null)
682 'moodle/cohort:assign' => array(
683
684 'captype' => 'write',
685 'contextlevel' => CONTEXT_COURSECAT,
31c93303 686 'archetypes' => array(
3f791403
PS
687 'manager' => CAP_ALLOW
688 )
689 ),
690
691 // view members of a cohort, this can be used in course context too,
692 // this also controls the ability to actually use cohort
693 'moodle/cohort:view' => array(
694
695 'captype' => 'read',
696 'contextlevel' => CONTEXT_COURSE,
31c93303 697 'archetypes' => array(
3f791403
PS
698 'editingteacher' => CAP_ALLOW,
699 'manager' => CAP_ALLOW
700 )
701 ),
702
bbbf2d40 703 'moodle/course:create' => array(
eef868d1 704
21b6db6e 705 'riskbitmask' => RISK_XSS,
706
bbbf2d40 707 'captype' => 'write',
5e992f56 708 'contextlevel' => CONTEXT_COURSECAT,
31c93303 709 'archetypes' => array(
4473252d 710 'coursecreator' => CAP_ALLOW,
4f0c2d00 711 'manager' => CAP_ALLOW
bbbf2d40 712 )
713 ),
eef868d1 714
e452210a 715 'moodle/course:request' => array(
716 'captype' => 'write',
717 'contextlevel' => CONTEXT_SYSTEM,
31c93303 718 'archetypes' => array(
e452210a 719 'user' => CAP_ALLOW,
720 )
721 ),
722
bbbf2d40 723 'moodle/course:delete' => array(
eef868d1 724
3a0c6cca 725 'riskbitmask' => RISK_DATALOSS,
726
bbbf2d40 727 'captype' => 'write',
728 'contextlevel' => CONTEXT_COURSE,
31c93303 729 'archetypes' => array(
4f0c2d00 730 'manager' => CAP_ALLOW
bbbf2d40 731 )
732 ),
eef868d1 733
bbbf2d40 734 'moodle/course:update' => array(
eef868d1 735
21b6db6e 736 'riskbitmask' => RISK_XSS,
737
bbbf2d40 738 'captype' => 'write',
739 'contextlevel' => CONTEXT_COURSE,
31c93303 740 'archetypes' => array(
bbbf2d40 741 'editingteacher' => CAP_ALLOW,
4f0c2d00 742 'manager' => CAP_ALLOW
bbbf2d40 743 )
744 ),
eef868d1 745
df997f84 746 'moodle/course:view' => array(
eef868d1 747
bbbf2d40 748 'captype' => 'read',
749 'contextlevel' => CONTEXT_COURSE,
31c93303 750 'archetypes' => array(
df997f84 751 'manager' => CAP_ALLOW,
bbbf2d40 752 )
753 ),
eef868d1 754
df997f84
PS
755 /* review course enrolments - no group restrictions, it is really full access to all participants info*/
756 'moodle/course:enrolreview' => array(
757
758 'riskbitmask' => RISK_PERSONAL,
4f0c2d00
PS
759
760 'captype' => 'read',
761 'contextlevel' => CONTEXT_COURSE,
31c93303 762 'archetypes' => array(
df997f84
PS
763 'editingteacher' => CAP_ALLOW,
764 'manager' => CAP_ALLOW,
765 )
766 ),
767
768 /* add, remove, hide enrol instances in courses */
769 'moodle/course:enrolconfig' => array(
770
771 'riskbitmask' => RISK_PERSONAL,
772
773 'captype' => 'write',
774 'contextlevel' => CONTEXT_COURSE,
775 'archetypes' => array(
776 'editingteacher' => CAP_ALLOW,
4f0c2d00
PS
777 'manager' => CAP_ALLOW,
778 )
779 ),
780
77c645df 781 'moodle/course:bulkmessaging' => array(
782
783 'riskbitmask' => RISK_SPAM,
784
785 'captype' => 'write',
786 'contextlevel' => CONTEXT_COURSE,
31c93303 787 'archetypes' => array(
77c645df 788 'teacher' => CAP_ALLOW,
789 'editingteacher' => CAP_ALLOW,
4f0c2d00 790 'manager' => CAP_ALLOW
77c645df 791 )
792 ),
793
1c45e42e 794 'moodle/course:viewhiddenuserfields' => array(
eef868d1 795
21b6db6e 796 'riskbitmask' => RISK_PERSONAL,
4e781c7b 797
798 'captype' => 'read',
799 'contextlevel' => CONTEXT_COURSE,
31c93303 800 'archetypes' => array(
4e781c7b 801 'teacher' => CAP_ALLOW,
802 'editingteacher' => CAP_ALLOW,
4f0c2d00 803 'manager' => CAP_ALLOW
4e781c7b 804 )
805 ),
806
1c45e42e 807 'moodle/course:viewhiddencourses' => array(
eef868d1 808
1c45e42e 809 'captype' => 'read',
810 'contextlevel' => CONTEXT_COURSE,
31c93303 811 'archetypes' => array(
2f5ab42b 812 'coursecreator' => CAP_ALLOW,
813 'teacher' => CAP_ALLOW,
814 'editingteacher' => CAP_ALLOW,
4f0c2d00 815 'manager' => CAP_ALLOW
1c45e42e 816 )
817 ),
eef868d1 818
bbbf2d40 819 'moodle/course:visibility' => array(
eef868d1 820
bbbf2d40 821 'captype' => 'write',
822 'contextlevel' => CONTEXT_COURSE,
31c93303 823 'archetypes' => array(
df997f84 824 'editingteacher' => CAP_ALLOW,
4f0c2d00 825 'manager' => CAP_ALLOW
bbbf2d40 826 )
827 ),
eef868d1 828
a028c291 829 'moodle/course:managefiles' => array(
eef868d1 830
21b6db6e 831 'riskbitmask' => RISK_XSS,
832
a028c291 833 'captype' => 'write',
834 'contextlevel' => CONTEXT_COURSE,
31c93303 835 'archetypes' => array(
a028c291 836 'editingteacher' => CAP_ALLOW,
4f0c2d00 837 'manager' => CAP_ALLOW
a028c291 838 )
839 ),
eef868d1 840
bbbf2d40 841 'moodle/course:manageactivities' => array(
eef868d1 842
21b6db6e 843 'riskbitmask' => RISK_XSS,
844
bbbf2d40 845 'captype' => 'write',
846 'contextlevel' => CONTEXT_COURSE,
31c93303 847 'archetypes' => array(
bbbf2d40 848 'editingteacher' => CAP_ALLOW,
4f0c2d00 849 'manager' => CAP_ALLOW
bbbf2d40 850 )
851 ),
eef868d1 852
bbbf2d40 853 'moodle/course:activityvisibility' => array(
eef868d1 854
bbbf2d40 855 'captype' => 'write',
856 'contextlevel' => CONTEXT_COURSE,
31c93303 857 'archetypes' => array(
bbbf2d40 858 'editingteacher' => CAP_ALLOW,
4f0c2d00 859 'manager' => CAP_ALLOW
bbbf2d40 860 )
861 ),
eef868d1 862
bbbf2d40 863 'moodle/course:viewhiddenactivities' => array(
eef868d1 864
bbbf2d40 865 'captype' => 'write',
866 'contextlevel' => CONTEXT_COURSE,
31c93303 867 'archetypes' => array(
bbbf2d40 868 'teacher' => CAP_ALLOW,
869 'editingteacher' => CAP_ALLOW,
4f0c2d00 870 'manager' => CAP_ALLOW
bbbf2d40 871 )
872 ),
eef868d1 873
bbbf2d40 874 'moodle/course:viewparticipants' => array(
eef868d1 875
bbbf2d40 876 'captype' => 'read',
877 'contextlevel' => CONTEXT_COURSE,
31c93303 878 'archetypes' => array(
bbbf2d40 879 'student' => CAP_ALLOW,
880 'teacher' => CAP_ALLOW,
881 'editingteacher' => CAP_ALLOW,
4f0c2d00 882 'manager' => CAP_ALLOW
165088f6 883 )
884 ),
f7c0d84b 885
886 'moodle/course:changefullname' => array(
887
cd7f72c0 888 'riskbitmask' => RISK_XSS,
889
f7c0d84b 890 'captype' => 'write',
891 'contextlevel' => CONTEXT_COURSE,
31c93303 892 'archetypes' => array(
f7c0d84b 893 'editingteacher' => CAP_ALLOW,
4f0c2d00 894 'manager' => CAP_ALLOW
5e99b9d7 895 ),
896 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 897 ),
898
899 'moodle/course:changeshortname' => array(
900
cd7f72c0 901 'riskbitmask' => RISK_XSS,
902
f7c0d84b 903 'captype' => 'write',
904 'contextlevel' => CONTEXT_COURSE,
31c93303 905 'archetypes' => array(
f7c0d84b 906 'editingteacher' => CAP_ALLOW,
4f0c2d00 907 'manager' => CAP_ALLOW
5e99b9d7 908 ),
909 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 910 ),
911
912 'moodle/course:changeidnumber' => array(
913
cd7f72c0 914 'riskbitmask' => RISK_XSS,
915
f7c0d84b 916 'captype' => 'write',
917 'contextlevel' => CONTEXT_COURSE,
31c93303 918 'archetypes' => array(
f7c0d84b 919 'editingteacher' => CAP_ALLOW,
4f0c2d00 920 'manager' => CAP_ALLOW
5e99b9d7 921 ),
922 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 923 ),
50569ba3 924 'moodle/course:changecategory' => array(
925 'riskbitmask' => RISK_XSS,
926
927 'captype' => 'write',
928 'contextlevel' => CONTEXT_COURSE,
31c93303 929 'archetypes' => array(
50569ba3 930 'editingteacher' => CAP_ALLOW,
4f0c2d00 931 'manager' => CAP_ALLOW
50569ba3 932 ),
933 'clonepermissionsfrom' => 'moodle/course:update'
934 ),
935
936 'moodle/course:changesummary' => array(
937 'riskbitmask' => RISK_XSS,
938
939 'captype' => 'write',
940 'contextlevel' => CONTEXT_COURSE,
31c93303 941 'archetypes' => array(
50569ba3 942 'editingteacher' => CAP_ALLOW,
4f0c2d00 943 'manager' => CAP_ALLOW
50569ba3 944 ),
945 'clonepermissionsfrom' => 'moodle/course:update'
946 ),
947
f7c0d84b 948
165088f6 949 'moodle/site:viewparticipants' => array(
950
951 'captype' => 'read',
952 'contextlevel' => CONTEXT_SYSTEM,
31c93303 953 'archetypes' => array(
4f0c2d00 954 'manager' => CAP_ALLOW
bbbf2d40 955 )
956 ),
eef868d1 957
bbbf2d40 958 'moodle/course:viewscales' => array(
eef868d1 959
bbbf2d40 960 'captype' => 'read',
961 'contextlevel' => CONTEXT_COURSE,
31c93303 962 'archetypes' => array(
bbbf2d40 963 'student' => CAP_ALLOW,
964 'teacher' => CAP_ALLOW,
965 'editingteacher' => CAP_ALLOW,
4f0c2d00 966 'manager' => CAP_ALLOW
bbbf2d40 967 )
968 ),
eef868d1 969
bbbf2d40 970 'moodle/course:managescales' => array(
eef868d1 971
bbbf2d40 972 'captype' => 'write',
973 'contextlevel' => CONTEXT_COURSE,
31c93303 974 'archetypes' => array(
bbbf2d40 975 'editingteacher' => CAP_ALLOW,
4f0c2d00 976 'manager' => CAP_ALLOW
bbbf2d40 977 )
978 ),
eef868d1 979
bbbf2d40 980 'moodle/course:managegroups' => array(
981
982 'captype' => 'write',
983 'contextlevel' => CONTEXT_COURSE,
31c93303 984 'archetypes' => array(
a028c291 985 'editingteacher' => CAP_ALLOW,
4f0c2d00 986 'manager' => CAP_ALLOW
a028c291 987 )
988 ),
eef868d1 989
a028c291 990 'moodle/course:reset' => array(
991
3a0c6cca 992 'riskbitmask' => RISK_DATALOSS,
993
a028c291 994 'captype' => 'write',
995 'contextlevel' => CONTEXT_COURSE,
31c93303 996 'archetypes' => array(
bbbf2d40 997 'editingteacher' => CAP_ALLOW,
4f0c2d00 998 'manager' => CAP_ALLOW
bbbf2d40 999 )
1000 ),
eef868d1 1001
bbbf2d40 1002 'moodle/blog:view' => array(
1003
1004 'captype' => 'read',
05de723b 1005 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1006 'archetypes' => array(
05de723b
NC
1007 'guest' => CAP_ALLOW,
1008 'user' => CAP_ALLOW,
1009 'student' => CAP_ALLOW,
1010 'teacher' => CAP_ALLOW,
1011 'editingteacher' => CAP_ALLOW,
4f0c2d00 1012 'manager' => CAP_ALLOW
05de723b
NC
1013 )
1014 ),
1015
1016 'moodle/blog:search' => array(
1017 'captype' => 'read',
1018 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1019 'archetypes' => array(
00adf177 1020 'guest' => CAP_ALLOW,
c785d40a 1021 'user' => CAP_ALLOW,
bbbf2d40 1022 'student' => CAP_ALLOW,
1023 'teacher' => CAP_ALLOW,
1024 'editingteacher' => CAP_ALLOW,
4f0c2d00 1025 'manager' => CAP_ALLOW
bbbf2d40 1026 )
1027 ),
eef868d1 1028
05de723b
NC
1029 'moodle/blog:viewdrafts' => array(
1030
1031 'riskbitmask' => RISK_PERSONAL,
1032 'captype' => 'read',
1033 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1034 'archetypes' => array(
4f0c2d00 1035 'manager' => CAP_ALLOW
05de723b
NC
1036 )
1037 ),
1038
5a8ab2e9 1039 'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 1040
21b6db6e 1041 'riskbitmask' => RISK_SPAM,
1042
bbbf2d40 1043 'captype' => 'write',
1044 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1045 'archetypes' => array(
c785d40a 1046 'user' => CAP_ALLOW,
4f0c2d00 1047 'manager' => CAP_ALLOW
bbbf2d40 1048 )
1049 ),
eef868d1 1050
bbbf2d40 1051 'moodle/blog:manageentries' => array(
1052
21b6db6e 1053 'riskbitmask' => RISK_SPAM,
1054
bbbf2d40 1055 'captype' => 'write',
05de723b 1056 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1057 'archetypes' => array(
bbbf2d40 1058 'teacher' => CAP_ALLOW,
1059 'editingteacher' => CAP_ALLOW,
4f0c2d00 1060 'manager' => CAP_ALLOW
bbbf2d40 1061 )
1062 ),
05de723b 1063
cae83708 1064 'moodle/blog:manageexternal' => array(
1065
1066 'riskbitmask' => RISK_SPAM,
1067
1068 'captype' => 'write',
296f6c99 1069 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1070 'archetypes' => array(
cae83708 1071 'student' => CAP_ALLOW,
1072 'user' => CAP_ALLOW,
1073 'teacher' => CAP_ALLOW,
1074 'editingteacher' => CAP_ALLOW,
4f0c2d00 1075 'manager' => CAP_ALLOW
cae83708 1076 )
1077 ),
1078
05de723b
NC
1079 'moodle/blog:associatecourse' => array(
1080
1081 'captype' => 'write',
1082 'contextlevel' => CONTEXT_COURSE,
31c93303 1083 'archetypes' => array(
05de723b
NC
1084 'student' => CAP_ALLOW,
1085 'user' => CAP_ALLOW,
1086 'teacher' => CAP_ALLOW,
1087 'editingteacher' => CAP_ALLOW,
4f0c2d00 1088 'manager' => CAP_ALLOW
05de723b
NC
1089 )
1090 ),
1091
1092 'moodle/blog:associatemodule' => array(
1093
1094 'captype' => 'write',
1095 'contextlevel' => CONTEXT_MODULE,
31c93303 1096 'archetypes' => array(
05de723b
NC
1097 'student' => CAP_ALLOW,
1098 'user' => CAP_ALLOW,
1099 'teacher' => CAP_ALLOW,
1100 'editingteacher' => CAP_ALLOW,
4f0c2d00 1101 'manager' => CAP_ALLOW
05de723b
NC
1102 )
1103 ),
eef868d1 1104
5a8ab2e9 1105 'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 1106
21b6db6e 1107 'riskbitmask' => RISK_SPAM,
1108
bbbf2d40 1109 'captype' => 'write',
f432bebf 1110 'contextlevel' => CONTEXT_COURSE,
31c93303 1111 'archetypes' => array(
c785d40a 1112 'user' => CAP_ALLOW,
4f0c2d00 1113 'manager' => CAP_ALLOW
bbbf2d40 1114 )
1115 ),
eef868d1 1116
f63d2922 1117 'moodle/calendar:managegroupentries' => array(
1118
1119 'riskbitmask' => RISK_SPAM,
1120
1121 'captype' => 'write',
f432bebf 1122 'contextlevel' => CONTEXT_COURSE,
31c93303 1123 'archetypes' => array(
f63d2922 1124 'teacher' => CAP_ALLOW,
1125 'editingteacher' => CAP_ALLOW,
4f0c2d00 1126 'manager' => CAP_ALLOW
f63d2922 1127 )
1128 ),
1129
bbbf2d40 1130 'moodle/calendar:manageentries' => array(
1131
21b6db6e 1132 'riskbitmask' => RISK_SPAM,
1133
bbbf2d40 1134 'captype' => 'write',
f432bebf 1135 'contextlevel' => CONTEXT_COURSE,
31c93303 1136 'archetypes' => array(
bbbf2d40 1137 'teacher' => CAP_ALLOW,
1138 'editingteacher' => CAP_ALLOW,
4f0c2d00 1139 'manager' => CAP_ALLOW
bbbf2d40 1140 )
77d4953e 1141 ),
a044c05d 1142
1143 'moodle/user:editprofile' => array(
1144
3a0c6cca 1145 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
a044c05d 1146
1147 'captype' => 'write',
1148 'contextlevel' => CONTEXT_USER,
31c93303 1149 'archetypes' => array(
4f0c2d00 1150 'manager' => CAP_ALLOW
a044c05d 1151 )
1152 ),
eef868d1 1153
a5b8be62 1154 'moodle/user:editownprofile' => array(
1cb3da36 1155
3a0c6cca 1156 'riskbitmask' => RISK_SPAM,
1157
a5b8be62 1158 'captype' => 'write',
1159 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1160 'archetypes' => array(
1cb3da36 1161 'guest' => CAP_PROHIBIT,
1162 'user' => CAP_ALLOW,
4f0c2d00 1163 'manager' => CAP_ALLOW
a5b8be62 1164 )
1cb3da36 1165 ),
1166
a5b8be62 1167 'moodle/user:changeownpassword' => array(
1cb3da36 1168
a5b8be62 1169 'captype' => 'write',
1170 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1171 'archetypes' => array(
1cb3da36 1172 'guest' => CAP_PROHIBIT,
1173 'user' => CAP_ALLOW,
4f0c2d00 1174 'manager' => CAP_ALLOW
a5b8be62 1175 )
1cb3da36 1176 ),
1177
eef868d1 1178 // The next 3 might make no sense for some roles, e.g teacher, etc.
77d4953e 1179 // since the next level up is site. These are more for the parent role
1180 'moodle/user:readuserposts' => array(
bcdb0f19 1181
77d4953e 1182 'captype' => 'read',
4b10f08b 1183 'contextlevel' => CONTEXT_USER,
31c93303 1184 'archetypes' => array(
77d4953e 1185 'student' => CAP_ALLOW,
1186 'teacher' => CAP_ALLOW,
1187 'editingteacher' => CAP_ALLOW,
4f0c2d00 1188 'manager' => CAP_ALLOW
77d4953e 1189 )
1190 ),
eef868d1 1191
77d4953e 1192 'moodle/user:readuserblogs' => array(
bcdb0f19 1193
77d4953e 1194 'captype' => 'read',
4b10f08b 1195 'contextlevel' => CONTEXT_USER,
31c93303 1196 'archetypes' => array(
77d4953e 1197 'student' => CAP_ALLOW,
1198 'teacher' => CAP_ALLOW,
1199 'editingteacher' => CAP_ALLOW,
4f0c2d00 1200 'manager' => CAP_ALLOW
77d4953e 1201 )
1202 ),
eef868d1 1203
3c7da16d 1204 // designed for parent role - not used in legacy roles
77d4953e 1205 'moodle/user:viewuseractivitiesreport' => array(
3c7da16d 1206 'riskbitmask' => RISK_PERSONAL,
bcdb0f19 1207
77d4953e 1208 'captype' => 'read',
4b10f08b 1209 'contextlevel' => CONTEXT_USER,
31c93303 1210 'archetypes' => array(
77d4953e 1211 )
945f88ca 1212 ),
4e781c7b 1213
3b120e46 1214 //capabilities designed for the new message system configuration
1215 'moodle/user:editmessageprofile' => array(
f7c0d84b 1216
3b120e46 1217 'riskbitmask' => RISK_SPAM,
f7c0d84b 1218
3b120e46 1219 'captype' => 'write',
1220 'contextlevel' => CONTEXT_USER,
31c93303 1221 'archetypes' => array(
4f0c2d00 1222 'manager' => CAP_ALLOW
3b120e46 1223 )
1224 ),
f7c0d84b 1225
1226 'moodle/user:editownmessageprofile' => array(
1227
1228 'captype' => 'write',
1229 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1230 'archetypes' => array(
3b120e46 1231 'guest' => CAP_PROHIBIT,
1232 'user' => CAP_ALLOW,
4f0c2d00 1233 'manager' => CAP_ALLOW
f7c0d84b 1234 )
3b120e46 1235 ),
eef868d1 1236
271e6dec 1237 'moodle/question:managecategory' => array(
14d701d6 1238 'riskbitmask' => RISK_SPAM | RISK_XSS,
945f88ca 1239 'captype' => 'write',
1240 'contextlevel' => CONTEXT_COURSE,
31c93303 1241 'archetypes' => array(
945f88ca 1242 'editingteacher' => CAP_ALLOW,
4f0c2d00 1243 'manager' => CAP_ALLOW
945f88ca 1244 )
a5b8be62 1245 ),
1246
271e6dec 1247 //new in moodle 1.9
1248 'moodle/question:add' => array(
14d701d6 1249 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 1250 'captype' => 'write',
1251 'contextlevel' => CONTEXT_COURSE,
31c93303 1252 'archetypes' => array(
271e6dec 1253 'editingteacher' => CAP_ALLOW,
4f0c2d00 1254 'manager' => CAP_ALLOW
271e6dec 1255 ),
1256 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1257 ),
271e6dec 1258 'moodle/question:editmine' => array(
14d701d6 1259 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 1260 'captype' => 'write',
1261 'contextlevel' => CONTEXT_COURSE,
31c93303 1262 'archetypes' => array(
271e6dec 1263 'editingteacher' => CAP_ALLOW,
4f0c2d00 1264 'manager' => CAP_ALLOW
271e6dec 1265 ),
a5b8be62 1266 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1267 ),
1268 'moodle/question:editall' => array(
14d701d6 1269 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 1270 'captype' => 'write',
1271 'contextlevel' => CONTEXT_COURSE,
31c93303 1272 'archetypes' => array(
271e6dec 1273 'editingteacher' => CAP_ALLOW,
4f0c2d00 1274 'manager' => CAP_ALLOW
271e6dec 1275 ),
a5b8be62 1276 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1277 ),
1278 'moodle/question:viewmine' => array(
945f88ca 1279 'captype' => 'read',
1280 'contextlevel' => CONTEXT_COURSE,
31c93303 1281 'archetypes' => array(
945f88ca 1282 'editingteacher' => CAP_ALLOW,
4f0c2d00 1283 'manager' => CAP_ALLOW
271e6dec 1284 ),
a5b8be62 1285 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1286 ),
271e6dec 1287 'moodle/question:viewall' => array(
1288 'captype' => 'read',
1289 'contextlevel' => CONTEXT_COURSE,
31c93303 1290 'archetypes' => array(
271e6dec 1291 'editingteacher' => CAP_ALLOW,
4f0c2d00 1292 'manager' => CAP_ALLOW
271e6dec 1293 ),
a5b8be62 1294 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1295 ),
1296 'moodle/question:usemine' => array(
1297 'captype' => 'read',
1298 'contextlevel' => CONTEXT_COURSE,
31c93303 1299 'archetypes' => array(
271e6dec 1300 'editingteacher' => CAP_ALLOW,
4f0c2d00 1301 'manager' => CAP_ALLOW
271e6dec 1302 ),
a5b8be62 1303 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1304 ),
1305 'moodle/question:useall' => array(
1306 'captype' => 'read',
1307 'contextlevel' => CONTEXT_COURSE,
31c93303 1308 'archetypes' => array(
271e6dec 1309 'editingteacher' => CAP_ALLOW,
4f0c2d00 1310 'manager' => CAP_ALLOW
271e6dec 1311 ),
a5b8be62 1312 'clonepermissionsfrom' => 'moodle/question:manage'
1313 ),
271e6dec 1314 'moodle/question:movemine' => array(
945f88ca 1315 'captype' => 'write',
1316 'contextlevel' => CONTEXT_COURSE,
31c93303 1317 'archetypes' => array(
945f88ca 1318 'editingteacher' => CAP_ALLOW,
4f0c2d00 1319 'manager' => CAP_ALLOW
271e6dec 1320 ),
a5b8be62 1321 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1322 ),
271e6dec 1323 'moodle/question:moveall' => array(
945f88ca 1324 'captype' => 'write',
1325 'contextlevel' => CONTEXT_COURSE,
31c93303 1326 'archetypes' => array(
945f88ca 1327 'editingteacher' => CAP_ALLOW,
4f0c2d00 1328 'manager' => CAP_ALLOW
271e6dec 1329 ),
a5b8be62 1330 'clonepermissionsfrom' => 'moodle/question:manage'
7191a1fa 1331 ),
271e6dec 1332 //END new in moodle 1.9
a5b8be62 1333
0eb6b04a 1334 // Configure the installed question types.
1335 'moodle/question:config' => array(
0eb6b04a 1336 'riskbitmask' => RISK_CONFIG,
0eb6b04a 1337 'captype' => 'write',
1338 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1339 'archetypes' => array(
4f0c2d00 1340 'manager' => CAP_ALLOW
0eb6b04a 1341 )
1342 ),
1343
62e76c67 1344 // While attempting questions, the ability to flag particular questions for later reference.
1345 'moodle/question:flag' => array(
1346 'captype' => 'write',
1347 'contextlevel' => CONTEXT_COURSE,
31c93303 1348 'archetypes' => array(
62e76c67 1349 'student' => CAP_ALLOW,
1350 'teacher' => CAP_ALLOW,
1351 'editingteacher' => CAP_ALLOW,
1352 'coursecreator' => CAP_ALLOW,
4f0c2d00 1353 'manager' => CAP_ALLOW
62e76c67 1354 )
1355 ),
bcdb0f19 1356
62e76c67 1357 'moodle/site:doclinks' => array(
7191a1fa 1358 'captype' => 'read',
1359 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1360 'archetypes' => array(
7191a1fa 1361 'teacher' => CAP_ALLOW,
1362 'editingteacher' => CAP_ALLOW,
4f0c2d00 1363 'manager' => CAP_ALLOW
7191a1fa 1364 )
3924b988 1365 ),
eef868d1 1366
3924b988 1367 'moodle/course:sectionvisibility' => array(
bcdb0f19 1368
3924b988 1369 'captype' => 'write',
1370 'contextlevel' => CONTEXT_COURSE,
31c93303 1371 'archetypes' => array(
3924b988 1372 'editingteacher' => CAP_ALLOW,
4f0c2d00 1373 'manager' => CAP_ALLOW
3924b988 1374 )
1375 ),
eef868d1 1376
dc558690 1377 'moodle/course:useremail' => array(
bcdb0f19 1378
dc558690 1379 'captype' => 'write',
1380 'contextlevel' => CONTEXT_COURSE,
31c93303 1381 'archetypes' => array(
dc558690 1382 'editingteacher' => CAP_ALLOW,
4f0c2d00 1383 'manager' => CAP_ALLOW
dc558690 1384 )
1385 ),
eef868d1 1386
3924b988 1387 'moodle/course:viewhiddensections' => array(
bcdb0f19 1388
3924b988 1389 'captype' => 'write',
1390 'contextlevel' => CONTEXT_COURSE,
31c93303 1391 'archetypes' => array(
3924b988 1392 'editingteacher' => CAP_ALLOW,
4f0c2d00 1393 'manager' => CAP_ALLOW
3924b988 1394 )
1395 ),
eef868d1 1396
3924b988 1397 'moodle/course:setcurrentsection' => array(
bcdb0f19 1398
3924b988 1399 'captype' => 'write',
1400 'contextlevel' => CONTEXT_COURSE,
31c93303 1401 'archetypes' => array(
3924b988 1402 'editingteacher' => CAP_ALLOW,
4f0c2d00 1403 'manager' => CAP_ALLOW
3924b988 1404 )
1405 ),
eef868d1 1406
dd45888a 1407 'moodle/site:mnetlogintoremote' => array(
bc4c9800 1408
3924b988 1409 'captype' => 'read',
dd45888a 1410 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1411 'archetypes' => array(
3924b988 1412 )
1413 ),
eef868d1 1414
dd45888a 1415 'moodle/grade:viewall' => array(
bcdb0f19 1416 'riskbitmask' => RISK_PERSONAL,
dd45888a 1417 'captype' => 'read',
eecf76df 1418 'contextlevel' => CONTEXT_COURSE, // and CONTEXT_USER
31c93303 1419 'archetypes' => array(
dd45888a 1420 'teacher' => CAP_ALLOW,
3924b988 1421 'editingteacher' => CAP_ALLOW,
4f0c2d00 1422 'manager' => CAP_ALLOW
dd45888a 1423 ),
1424 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
f509ce06 1425 ),
f43ce1ad 1426
dd45888a 1427 'moodle/grade:view' => array(
f509ce06 1428 'captype' => 'read',
eecf76df 1429 'contextlevel' => CONTEXT_COURSE,
31c93303 1430 'archetypes' => array(
dd45888a 1431 'student' => CAP_ALLOW
f509ce06 1432 )
ca9ffa18 1433 ),
dd45888a 1434
1435 'moodle/grade:viewhidden' => array(
ca9ffa18 1436 'riskbitmask' => RISK_PERSONAL,
1437 'captype' => 'read',
eecf76df 1438 'contextlevel' => CONTEXT_COURSE,
31c93303 1439 'archetypes' => array(
0371f8e5 1440 'teacher' => CAP_ALLOW,
1441 'editingteacher' => CAP_ALLOW,
4f0c2d00 1442 'manager' => CAP_ALLOW
dd45888a 1443 ),
1444 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
ca9ffa18 1445 ),
dd45888a 1446
1447 'moodle/grade:import' => array(
3a0c6cca 1448 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1449 'captype' => 'write',
ca9ffa18 1450 'contextlevel' => CONTEXT_COURSE,
31c93303 1451 'archetypes' => array(
ca9ffa18 1452 'editingteacher' => CAP_ALLOW,
4f0c2d00 1453 'manager' => CAP_ALLOW
dd45888a 1454 ),
1455 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1456 ),
dd45888a 1457
1458 'moodle/grade:export' => array(
ca9ffa18 1459 'riskbitmask' => RISK_PERSONAL,
1460 'captype' => 'read',
1461 'contextlevel' => CONTEXT_COURSE,
31c93303 1462 'archetypes' => array(
ca9ffa18 1463 'teacher' => CAP_ALLOW,
1464 'editingteacher' => CAP_ALLOW,
4f0c2d00 1465 'manager' => CAP_ALLOW
dd45888a 1466 ),
1467 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1468 ),
dd45888a 1469
1470 'moodle/grade:manage' => array(
3a0c6cca 1471 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1472 'captype' => 'write',
1473 'contextlevel' => CONTEXT_COURSE,
31c93303 1474 'archetypes' => array(
dd45888a 1475 'editingteacher' => CAP_ALLOW,
4f0c2d00 1476 'manager' => CAP_ALLOW
dd45888a 1477 ),
1478 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1479 ),
dd45888a 1480
a5b8be62 1481 'moodle/grade:edit' => array(
1482 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
04259694 1483 'captype' => 'write',
1484 'contextlevel' => CONTEXT_COURSE,
31c93303 1485 'archetypes' => array(
04259694 1486 'editingteacher' => CAP_ALLOW,
4f0c2d00 1487 'manager' => CAP_ALLOW
04259694 1488 ),
1489 'clonepermissionsfrom' => 'moodle/course:managegrades'
1490 ),
1491
a5b8be62 1492 'moodle/grade:manageoutcomes' => array(
284abb09 1493 'captype' => 'write',
1494 'contextlevel' => CONTEXT_COURSE,
31c93303 1495 'archetypes' => array(
284abb09 1496 'editingteacher' => CAP_ALLOW,
4f0c2d00 1497 'manager' => CAP_ALLOW
284abb09 1498 ),
1499 'clonepermissionsfrom' => 'moodle/course:managegrades'
1500 ),
1501
1502 'moodle/grade:manageletters' => array(
ca9ffa18 1503 'captype' => 'write',
1504 'contextlevel' => CONTEXT_COURSE,
31c93303 1505 'archetypes' => array(
ca9ffa18 1506 'editingteacher' => CAP_ALLOW,
4f0c2d00 1507 'manager' => CAP_ALLOW
a5b8be62 1508 ),
1509 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1510 ),
dd45888a 1511
a5b8be62 1512 'moodle/grade:hide' => array(
ca9ffa18 1513 'captype' => 'write',
1514 'contextlevel' => CONTEXT_COURSE,
31c93303 1515 'archetypes' => array(
ca9ffa18 1516 'editingteacher' => CAP_ALLOW,
4f0c2d00 1517 'manager' => CAP_ALLOW
ca9ffa18 1518 )
1519 ),
dd45888a 1520
a5b8be62 1521 'moodle/grade:lock' => array(
dd45888a 1522 'captype' => 'write',
ca9ffa18 1523 'contextlevel' => CONTEXT_COURSE,
31c93303 1524 'archetypes' => array(
ca9ffa18 1525 'editingteacher' => CAP_ALLOW,
4f0c2d00 1526 'manager' => CAP_ALLOW
ca9ffa18 1527 )
1528 ),
dd45888a 1529
a5b8be62 1530 'moodle/grade:unlock' => array(
ca9ffa18 1531 'captype' => 'write',
1532 'contextlevel' => CONTEXT_COURSE,
31c93303 1533 'archetypes' => array(
ca9ffa18 1534 'editingteacher' => CAP_ALLOW,
4f0c2d00 1535 'manager' => CAP_ALLOW
ca9ffa18 1536 )
282c1695 1537 ),
dd45888a 1538
1539 'moodle/my:manageblocks' => array(
282c1695 1540 'captype' => 'write',
1541 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1542 'archetypes' => array(
282c1695 1543 'user' => CAP_ALLOW
1544 )
eca3af25 1545 ),
dd45888a 1546
eca3af25 1547 'moodle/notes:view' => array(
1548 'captype' => 'read',
f432bebf 1549 'contextlevel' => CONTEXT_COURSE,
31c93303 1550 'archetypes' => array(
eca3af25 1551 'teacher' => CAP_ALLOW,
1552 'editingteacher' => CAP_ALLOW,
4f0c2d00 1553 'manager' => CAP_ALLOW
eca3af25 1554 )
1555 ),
1556
1557 'moodle/notes:manage' => array(
3a0c6cca 1558 'riskbitmask' => RISK_SPAM,
1559
eca3af25 1560 'captype' => 'write',
f432bebf 1561 'contextlevel' => CONTEXT_COURSE,
31c93303 1562 'archetypes' => array(
eca3af25 1563 'teacher' => CAP_ALLOW,
1564 'editingteacher' => CAP_ALLOW,
4f0c2d00 1565 'manager' => CAP_ALLOW
eca3af25 1566 )
dd45888a 1567 ),
79642064 1568
1569 'moodle/tag:manage' => array(
3a0c6cca 1570 'riskbitmask' => RISK_SPAM,
1571
79642064 1572 'captype' => 'write',
1573 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1574 'archetypes' => array(
79642064 1575 'teacher' => CAP_ALLOW,
1576 'editingteacher' => CAP_ALLOW,
4f0c2d00 1577 'manager' => CAP_ALLOW
79642064 1578 )
705789bd 1579 ),
1580
1581 'moodle/tag:create' => array(
3a0c6cca 1582 'riskbitmask' => RISK_SPAM,
1583
705789bd 1584 'captype' => 'write',
1585 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1586 'archetypes' => array(
4f0c2d00 1587 'manager' => CAP_ALLOW,
0f07c40e 1588 'user' => CAP_ALLOW
705789bd 1589 )
1590 ),
a5b8be62 1591
705789bd 1592 'moodle/tag:edit' => array(
3a0c6cca 1593 'riskbitmask' => RISK_SPAM,
1594
705789bd 1595 'captype' => 'write',
1596 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1597 'archetypes' => array(
4f0c2d00 1598 'manager' => CAP_ALLOW,
3e6e529f 1599 'user' => CAP_ALLOW
98b5789d 1600 )
1601 ),
a5b8be62 1602
98b5789d 1603 'moodle/tag:editblocks' => array(
1604 'captype' => 'write',
1605 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1606 'archetypes' => array(
705789bd 1607 'teacher' => CAP_ALLOW,
1608 'editingteacher' => CAP_ALLOW,
4f0c2d00 1609 'manager' => CAP_ALLOW
705789bd 1610 )
7e874772 1611 ),
1612
1613 'moodle/block:view' => array(
1614 'captype' => 'read',
1615 'contextlevel' => CONTEXT_BLOCK,
31c93303 1616 'archetypes' => array(
7e874772 1617 'guest' => CAP_ALLOW,
25a7d980 1618 'user' => CAP_ALLOW,
1619 'student' => CAP_ALLOW,
1620 'teacher' => CAP_ALLOW,
1621 'editingteacher' => CAP_ALLOW,
1622 'coursecreator' => CAP_ALLOW
7e874772 1623 )
8512f577 1624 ),
1625
d14edf06 1626 'moodle/block:edit' => array(
1627 'riskbitmask' => RISK_SPAM | RISK_XSS,
1628
1629 'captype' => 'write',
1630 'contextlevel' => CONTEXT_BLOCK,
31c93303 1631 'archetypes' => array(
d14edf06 1632 'editingteacher' => CAP_ALLOW,
1633 'coursecreator' => CAP_ALLOW
1634 )
1635 ),
1636
8512f577 1637 'moodle/portfolio:export' => array(
1638 'captype' => 'read',
1639 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1640 'archetypes' => array(
8512f577 1641 'user' => CAP_ALLOW,
1642 'student' => CAP_ALLOW,
1643 'teacher' => CAP_ALLOW,
1644 'editingteacher' => CAP_ALLOW,
1645 'coursecreator' => CAP_ALLOW
1646 )
1bcb7eb5 1647 ),
1648 'moodle/comment:view' => array(
1649
1650 'captype' => 'read',
ad0ae261 1651 'contextlevel' => CONTEXT_COURSE,
31c93303 1652 'archetypes' => array(
1bcb7eb5 1653 'user' => CAP_ALLOW,
1654 'student' => CAP_ALLOW,
1655 'teacher' => CAP_ALLOW,
1656 'editingteacher' => CAP_ALLOW,
1657 'coursecreator' => CAP_ALLOW,
4f0c2d00 1658 'manager' => CAP_ALLOW
1bcb7eb5 1659 )
1660 ),
1661 'moodle/comment:post' => array(
1662
1663 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
1664 'captype' => 'write',
ad0ae261 1665 'contextlevel' => CONTEXT_COURSE,
31c93303 1666 'archetypes' => array(
1bcb7eb5 1667 'user' => CAP_ALLOW,
1668 'student' => CAP_ALLOW,
1669 'teacher' => CAP_ALLOW,
1670 'editingteacher' => CAP_ALLOW,
1671 'coursecreator' => CAP_ALLOW,
4f0c2d00 1672 'manager' => CAP_ALLOW
1bcb7eb5 1673 )
1674 ),
1675 'moodle/comment:delete' => array(
1676
1677 'riskbitmask' => RISK_DATALOSS,
1678 'captype' => 'write',
ad0ae261 1679 'contextlevel' => CONTEXT_COURSE,
31c93303 1680 'archetypes' => array(
1bcb7eb5 1681 'editingteacher' => CAP_ALLOW,
1682 'coursecreator' => CAP_ALLOW,
4f0c2d00 1683 'manager' => CAP_ALLOW
1bcb7eb5 1684 )
5eacbd4b 1685 ),
1686 'moodle/webservice:createtoken' => array(
1687
52dd27bf 1688 'riskbitmask' => RISK_CONFIG | RISK_DATALOSS | RISK_SPAM | RISK_PERSONAL | RISK_XSS,
5eacbd4b 1689 'captype' => 'write',
1690 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1691 'archetypes' => array(
4f0c2d00 1692 'manager' => CAP_ALLOW
5eacbd4b 1693 )
a09aeee4 1694 ),
19fae119 1695 'moodle/rating:view' => array(
ad0ae261 1696
a09aeee4 1697 'captype' => 'read',
ad0ae261 1698 'contextlevel' => CONTEXT_COURSE,
31c93303 1699 'archetypes' => array(
ad0ae261 1700 'user' => CAP_ALLOW,
e116a818
AD
1701 'student' => CAP_ALLOW,
1702 'teacher' => CAP_ALLOW,
1703 'editingteacher' => CAP_ALLOW,
4f0c2d00 1704 'manager' => CAP_ALLOW
a09aeee4
AD
1705 )
1706 ),
6595a568 1707 'moodle/rating:viewany' => array(
ad0ae261 1708
6595a568
MD
1709 'riskbitmask' => RISK_PERSONAL,
1710 'captype' => 'read',
ad0ae261 1711 'contextlevel' => CONTEXT_COURSE,
31c93303 1712 'archetypes' => array(
ad0ae261 1713 'user' => CAP_ALLOW,
6595a568
MD
1714 'student' => CAP_ALLOW,
1715 'teacher' => CAP_ALLOW,
1716 'editingteacher' => CAP_ALLOW,
1717 'manager' => CAP_ALLOW
1718 )
1719 ),
19fae119 1720 'moodle/rating:viewall' => array(
ad0ae261 1721
a09aeee4
AD
1722 'riskbitmask' => RISK_PERSONAL,
1723 'captype' => 'read',
ad0ae261 1724 'contextlevel' => CONTEXT_COURSE,
31c93303 1725 'archetypes' => array(
ad0ae261 1726 'user' => CAP_ALLOW,
6595a568 1727 'student' => CAP_ALLOW,
e116a818
AD
1728 'teacher' => CAP_ALLOW,
1729 'editingteacher' => CAP_ALLOW,
4f0c2d00 1730 'manager' => CAP_ALLOW
a09aeee4
AD
1731 )
1732 ),
19fae119 1733 'moodle/rating:rate' => array(
ad0ae261 1734
a09aeee4 1735 'captype' => 'write',
ad0ae261 1736 'contextlevel' => CONTEXT_COURSE,
31c93303 1737 'archetypes' => array(
ad0ae261 1738 'user' => CAP_ALLOW,
6595a568 1739 'student' => CAP_ALLOW,
e116a818
AD
1740 'teacher' => CAP_ALLOW,
1741 'editingteacher' => CAP_ALLOW,
4f0c2d00 1742 'manager' => CAP_ALLOW
a09aeee4 1743 )
07ab0c80 1744 ),
1745 'moodle/course:publish' => array(
1746
07ab0c80 1747 'captype' => 'write',
ad0ae261 1748 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
07ab0c80 1749 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1750 'archetypes' => array(
07ab0c80 1751 'manager' => CAP_ALLOW
1752 )
2be4d090
MD
1753 ),
1754 'moodle/course:markcomplete' => array(
1755 'captype' => 'write',
1756 'contextlevel' => CONTEXT_COURSE,
31c93303 1757 'archetypes' => array(
2be4d090
MD
1758 'teacher' => CAP_ALLOW,
1759 'editingteacher' => CAP_ALLOW,
1760 'coursecreator' => CAP_ALLOW,
1761 'manager' => CAP_ALLOW
1762 )
755f96f8 1763 ),
1764 'moodle/community:add' => array(
1765 'captype' => 'write',
1766 'contextlevel' => CONTEXT_SYSTEM,
1767 'archetypes' => array(
1768 'manager' => CAP_ALLOW,
1769 'teacher' => CAP_ALLOW,
17957b8f 1770 'editingteacher' => CAP_ALLOW,
755f96f8 1771 'coursecreator' => CAP_ALLOW
1772 )
1773 ),
1774 'moodle/community:download' => array(
1775 'captype' => 'write',
1776 'contextlevel' => CONTEXT_SYSTEM,
1777 'archetypes' => array(
1778 'manager' => CAP_ALLOW,
17957b8f 1779 'editingteacher' => CAP_ALLOW,
755f96f8 1780 'coursecreator' => CAP_ALLOW
1781 )
79642064 1782 )
bbbf2d40 1783);