MDL-29108 Improved support for form definition status
[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,
4f0c2d00 431 'manager' => CAP_ALLOW,
94211250 432 )
433 ),
6df3c7df 434
435 'moodle/user:create' => array(
436
437 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
eef868d1 438
bbbf2d40 439 'captype' => 'write',
440 'contextlevel' => CONTEXT_SYSTEM,
31c93303 441 'archetypes' => array(
4f0c2d00 442 'manager' => CAP_ALLOW
bbbf2d40 443 )
444 ),
eef868d1 445
6df3c7df 446 'moodle/user:delete' => array(
cc891abe 447
3a0c6cca 448 'riskbitmask' => RISK_PERSONAL, RISK_DATALOSS,
bcdb0f19 449
cc891abe 450 'captype' => 'write',
451 'contextlevel' => CONTEXT_SYSTEM,
31c93303 452 'archetypes' => array(
4f0c2d00 453 'manager' => CAP_ALLOW
cc891abe 454 )
455 ),
456
6df3c7df 457 'moodle/user:update' => array(
cc891abe 458
459 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
21b6db6e 460
bbbf2d40 461 'captype' => 'write',
462 'contextlevel' => CONTEXT_SYSTEM,
31c93303 463 'archetypes' => array(
4f0c2d00 464 'manager' => CAP_ALLOW
bbbf2d40 465 )
466 ),
eef868d1 467
bbbf2d40 468 'moodle/user:viewdetails' => array(
eef868d1 469
e58eca72 470 'captype' => 'read',
f432bebf 471 'contextlevel' => CONTEXT_COURSE,
31c93303 472 'archetypes' => array(
22ae509e 473 'guest' => CAP_ALLOW,
474 'student' => CAP_ALLOW,
475 'teacher' => CAP_ALLOW,
476 'editingteacher' => CAP_ALLOW,
4f0c2d00 477 'manager' => CAP_ALLOW
bbbf2d40 478 )
479 ),
e58eca72 480
6d153e67 481 'moodle/user:viewalldetails' => array(
482 'riskbitmask' => RISK_PERSONAL,
483 'captype' => 'read',
484 'contextlevel' => CONTEXT_USER,
485 'archetypes' => array(
486 'manager' => CAP_ALLOW
487 ),
488 'clonepermissionsfrom' => 'moodle/user:update'
489 ),
490
e58eca72 491 'moodle/user:viewhiddendetails' => array(
eef868d1 492
21b6db6e 493 'riskbitmask' => RISK_PERSONAL,
494
e58eca72 495 'captype' => 'read',
f432bebf 496 'contextlevel' => CONTEXT_COURSE,
31c93303 497 'archetypes' => array(
e58eca72 498 'teacher' => CAP_ALLOW,
499 'editingteacher' => CAP_ALLOW,
4f0c2d00 500 'manager' => CAP_ALLOW
e58eca72 501 )
502 ),
eef868d1 503
6c95827f 504 'moodle/user:loginas' => array(
505
506 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
507
508 'captype' => 'write',
509 'contextlevel' => CONTEXT_COURSE,
31c93303 510 'archetypes' => array(
4f0c2d00 511 'manager' => CAP_ALLOW
6c95827f 512 )
513 ),
514
03d9401e
MD
515 // can the user manage the system default profile page?
516 'moodle/user:managesyspages' => array(
517
518 'riskbitmap' => RISK_SPAM | RISK_PERSONAL | RISK_CONFIG,
519
520 'captype' => 'write',
521 'contextlevel' => CONTEXT_SYSTEM,
31c93303 522 'archetypes' => array(
03d9401e
MD
523 'manager' => CAP_ALLOW
524 )
525 ),
526
527 // can the user manage another user's profile page?
528 'moodle/user:manageblocks' => array(
529
530 'riskbitmap' => RISK_SPAM | RISK_PERSONAL,
531
532 'captype' => 'write',
533 'contextlevel' => CONTEXT_USER
534 ),
535
536 // can the user manage their own profile page?
537 'moodle/user:manageownblocks' => array(
538
539 'riskbitmap' => RISK_SPAM | RISK_PERSONAL,
540
541 'captype' => 'write',
542 'contextlevel' => CONTEXT_SYSTEM,
31c93303 543 'archetypes' => array(
e4f413b4
MD
544 'user' => CAP_ALLOW
545 )
546 ),
547
548 // can the user manage their own files?
549 'moodle/user:manageownfiles' => array(
550
551 'riskbitmap' => RISK_SPAM | RISK_PERSONAL,
552
553 'captype' => 'write',
554 'contextlevel' => CONTEXT_SYSTEM,
555 'archetypes' => array(
556 'user' => CAP_ALLOW
03d9401e
MD
557 )
558 ),
559
560 // can the user manage the system default dashboard page?
561 'moodle/my:configsyspages' => array(
562
563 'riskbitmap' => RISK_SPAM | RISK_PERSONAL | RISK_CONFIG,
564
565 'captype' => 'write',
566 'contextlevel' => CONTEXT_SYSTEM,
31c93303 567 'archetypes' => array(
03d9401e
MD
568 'manager' => CAP_ALLOW
569 )
570 ),
571
bbbf2d40 572 'moodle/role:assign' => array(
eef868d1 573
3a0c6cca 574 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
575
bbbf2d40 576 'captype' => 'write',
f432bebf 577 'contextlevel' => CONTEXT_COURSE,
31c93303 578 'archetypes' => array(
861fdcaa 579 'editingteacher' => CAP_ALLOW,
4f0c2d00 580 'manager' => CAP_ALLOW
68c52526 581 )
582 ),
eef868d1 583
01a2ce80
PS
584 'moodle/role:review' => array(
585
586 'riskbitmask' => RISK_PERSONAL,
587
588 'captype' => 'read',
589 'contextlevel' => CONTEXT_COURSE,
31c93303 590 'archetypes' => array(
01a2ce80
PS
591 'teacher' => CAP_ALLOW,
592 'editingteacher' => CAP_ALLOW,
4f0c2d00 593 'manager' => CAP_ALLOW
01a2ce80
PS
594 )
595 ),
596
68c52526 597 'moodle/role:override' => array(
eef868d1 598
bcdb0f19 599 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
600
68c52526 601 'captype' => 'write',
f432bebf 602 'contextlevel' => CONTEXT_COURSE,
31c93303 603 'archetypes' => array(
4f0c2d00 604 'manager' => CAP_ALLOW
bbbf2d40 605 )
606 ),
eef868d1 607
3a0c6cca 608 'moodle/role:safeoverride' => array(
609
610 'riskbitmask' => RISK_SPAM,
611
612 'captype' => 'write',
f432bebf 613 'contextlevel' => CONTEXT_COURSE,
31c93303 614 'archetypes' => array(
3a0c6cca 615 'editingteacher' => CAP_ALLOW
616 )
617 ),
618
bbbf2d40 619 'moodle/role:manage' => array(
eef868d1 620
bcdb0f19 621 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
622
bbbf2d40 623 'captype' => 'write',
624 'contextlevel' => CONTEXT_SYSTEM,
31c93303 625 'archetypes' => array(
4f0c2d00 626 'manager' => CAP_ALLOW
bbbf2d40 627 )
628 ),
f43ce1ad 629
20dd4cf5 630 'moodle/role:switchroles' => array(
bcdb0f19 631
3a0c6cca 632 'riskbitmask' => RISK_XSS | RISK_PERSONAL,
bcdb0f19 633
20dd4cf5 634 'captype' => 'read',
f432bebf 635 'contextlevel' => CONTEXT_COURSE,
31c93303 636 'archetypes' => array(
20dd4cf5 637 'editingteacher' => CAP_ALLOW,
4f0c2d00 638 'manager' => CAP_ALLOW
20dd4cf5 639 )
640 ),
641
8ed5dd63 642 // Create, update and delete course categories. (Deleting a course category
643 // does not let you delete the courses it contains, unless you also have
644 // moodle/course: delete.) Creating and deleting requires this permission in
645 // the parent category.
646 'moodle/category:manage' => array(
eef868d1 647
89a792ab 648 'riskbitmask' => RISK_XSS,
649
bbbf2d40 650 'captype' => 'write',
651 'contextlevel' => CONTEXT_COURSECAT,
31c93303 652 'archetypes' => array(
4f0c2d00 653 'manager' => CAP_ALLOW
8ed5dd63 654 ),
655 'clonepermissionsfrom' => 'moodle/category:update'
bbbf2d40 656 ),
eef868d1 657
8ed5dd63 658 'moodle/category:viewhiddencategories' => array(
eef868d1 659
8ed5dd63 660 'captype' => 'read',
bbbf2d40 661 'contextlevel' => CONTEXT_COURSECAT,
31c93303 662 'archetypes' => array(
8ed5dd63 663 'coursecreator' => CAP_ALLOW,
4f0c2d00 664 'manager' => CAP_ALLOW
8ed5dd63 665 ),
666 'clonepermissionsfrom' => 'moodle/category:visibility'
bbbf2d40 667 ),
eef868d1 668
3f791403
PS
669 // create, delete, move cohorts in system and course categories,
670 // (cohorts with component !== null can be only moved)
671 'moodle/cohort:manage' => array(
672
673 'captype' => 'write',
674 'contextlevel' => CONTEXT_COURSECAT,
31c93303 675 'archetypes' => array(
3f791403
PS
676 'manager' => CAP_ALLOW
677 )
678 ),
679
680 // add and remove cohort members (only for cohorts where component !== null)
681 'moodle/cohort:assign' => array(
682
683 'captype' => 'write',
684 'contextlevel' => CONTEXT_COURSECAT,
31c93303 685 'archetypes' => array(
3f791403
PS
686 'manager' => CAP_ALLOW
687 )
688 ),
689
690 // view members of a cohort, this can be used in course context too,
691 // this also controls the ability to actually use cohort
692 'moodle/cohort:view' => array(
693
694 'captype' => 'read',
695 'contextlevel' => CONTEXT_COURSE,
31c93303 696 'archetypes' => array(
3f791403
PS
697 'editingteacher' => CAP_ALLOW,
698 'manager' => CAP_ALLOW
699 )
700 ),
701
bbbf2d40 702 'moodle/course:create' => array(
eef868d1 703
21b6db6e 704 'riskbitmask' => RISK_XSS,
705
bbbf2d40 706 'captype' => 'write',
5e992f56 707 'contextlevel' => CONTEXT_COURSECAT,
31c93303 708 'archetypes' => array(
4473252d 709 'coursecreator' => CAP_ALLOW,
4f0c2d00 710 'manager' => CAP_ALLOW
bbbf2d40 711 )
712 ),
eef868d1 713
e452210a 714 'moodle/course:request' => array(
715 'captype' => 'write',
716 'contextlevel' => CONTEXT_SYSTEM,
31c93303 717 'archetypes' => array(
e452210a 718 'user' => CAP_ALLOW,
719 )
720 ),
721
bbbf2d40 722 'moodle/course:delete' => array(
eef868d1 723
3a0c6cca 724 'riskbitmask' => RISK_DATALOSS,
725
bbbf2d40 726 'captype' => 'write',
727 'contextlevel' => CONTEXT_COURSE,
31c93303 728 'archetypes' => array(
4f0c2d00 729 'manager' => CAP_ALLOW
bbbf2d40 730 )
731 ),
eef868d1 732
bbbf2d40 733 'moodle/course:update' => array(
eef868d1 734
21b6db6e 735 'riskbitmask' => RISK_XSS,
736
bbbf2d40 737 'captype' => 'write',
738 'contextlevel' => CONTEXT_COURSE,
31c93303 739 'archetypes' => array(
bbbf2d40 740 'editingteacher' => CAP_ALLOW,
4f0c2d00 741 'manager' => CAP_ALLOW
bbbf2d40 742 )
743 ),
eef868d1 744
df997f84 745 'moodle/course:view' => array(
eef868d1 746
bbbf2d40 747 'captype' => 'read',
748 'contextlevel' => CONTEXT_COURSE,
31c93303 749 'archetypes' => array(
df997f84 750 'manager' => CAP_ALLOW,
bbbf2d40 751 )
752 ),
eef868d1 753
df997f84
PS
754 /* review course enrolments - no group restrictions, it is really full access to all participants info*/
755 'moodle/course:enrolreview' => array(
756
757 'riskbitmask' => RISK_PERSONAL,
4f0c2d00
PS
758
759 'captype' => 'read',
760 'contextlevel' => CONTEXT_COURSE,
31c93303 761 'archetypes' => array(
df997f84
PS
762 'editingteacher' => CAP_ALLOW,
763 'manager' => CAP_ALLOW,
764 )
765 ),
766
767 /* add, remove, hide enrol instances in courses */
768 'moodle/course:enrolconfig' => array(
769
770 'riskbitmask' => RISK_PERSONAL,
771
772 'captype' => 'write',
773 'contextlevel' => CONTEXT_COURSE,
774 'archetypes' => array(
775 'editingteacher' => CAP_ALLOW,
4f0c2d00
PS
776 'manager' => CAP_ALLOW,
777 )
778 ),
779
77c645df 780 'moodle/course:bulkmessaging' => array(
781
782 'riskbitmask' => RISK_SPAM,
783
784 'captype' => 'write',
785 'contextlevel' => CONTEXT_COURSE,
31c93303 786 'archetypes' => array(
77c645df 787 'teacher' => CAP_ALLOW,
788 'editingteacher' => CAP_ALLOW,
4f0c2d00 789 'manager' => CAP_ALLOW
77c645df 790 )
791 ),
792
1c45e42e 793 'moodle/course:viewhiddenuserfields' => array(
eef868d1 794
21b6db6e 795 'riskbitmask' => RISK_PERSONAL,
4e781c7b 796
797 'captype' => 'read',
798 'contextlevel' => CONTEXT_COURSE,
31c93303 799 'archetypes' => array(
4e781c7b 800 'teacher' => CAP_ALLOW,
801 'editingteacher' => CAP_ALLOW,
4f0c2d00 802 'manager' => CAP_ALLOW
4e781c7b 803 )
804 ),
805
1c45e42e 806 'moodle/course:viewhiddencourses' => array(
eef868d1 807
1c45e42e 808 'captype' => 'read',
809 'contextlevel' => CONTEXT_COURSE,
31c93303 810 'archetypes' => array(
2f5ab42b 811 'coursecreator' => CAP_ALLOW,
812 'teacher' => CAP_ALLOW,
813 'editingteacher' => CAP_ALLOW,
4f0c2d00 814 'manager' => CAP_ALLOW
1c45e42e 815 )
816 ),
eef868d1 817
bbbf2d40 818 'moodle/course:visibility' => array(
eef868d1 819
bbbf2d40 820 'captype' => 'write',
821 'contextlevel' => CONTEXT_COURSE,
31c93303 822 'archetypes' => array(
df997f84 823 'editingteacher' => CAP_ALLOW,
4f0c2d00 824 'manager' => CAP_ALLOW
bbbf2d40 825 )
826 ),
eef868d1 827
a028c291 828 'moodle/course:managefiles' => array(
eef868d1 829
21b6db6e 830 'riskbitmask' => RISK_XSS,
831
a028c291 832 'captype' => 'write',
833 'contextlevel' => CONTEXT_COURSE,
31c93303 834 'archetypes' => array(
a028c291 835 'editingteacher' => CAP_ALLOW,
4f0c2d00 836 'manager' => CAP_ALLOW
a028c291 837 )
838 ),
eef868d1 839
bbbf2d40 840 'moodle/course:manageactivities' => array(
eef868d1 841
21b6db6e 842 'riskbitmask' => RISK_XSS,
843
bbbf2d40 844 'captype' => 'write',
845 'contextlevel' => CONTEXT_COURSE,
31c93303 846 'archetypes' => array(
bbbf2d40 847 'editingteacher' => CAP_ALLOW,
4f0c2d00 848 'manager' => CAP_ALLOW
bbbf2d40 849 )
850 ),
eef868d1 851
bbbf2d40 852 'moodle/course:activityvisibility' => array(
eef868d1 853
bbbf2d40 854 'captype' => 'write',
855 'contextlevel' => CONTEXT_COURSE,
31c93303 856 'archetypes' => array(
bbbf2d40 857 'editingteacher' => CAP_ALLOW,
4f0c2d00 858 'manager' => CAP_ALLOW
bbbf2d40 859 )
860 ),
eef868d1 861
bbbf2d40 862 'moodle/course:viewhiddenactivities' => array(
eef868d1 863
bbbf2d40 864 'captype' => 'write',
865 'contextlevel' => CONTEXT_COURSE,
31c93303 866 'archetypes' => array(
bbbf2d40 867 'teacher' => CAP_ALLOW,
868 'editingteacher' => CAP_ALLOW,
4f0c2d00 869 'manager' => CAP_ALLOW
bbbf2d40 870 )
871 ),
eef868d1 872
bbbf2d40 873 'moodle/course:viewparticipants' => array(
eef868d1 874
bbbf2d40 875 'captype' => 'read',
876 'contextlevel' => CONTEXT_COURSE,
31c93303 877 'archetypes' => array(
bbbf2d40 878 'student' => CAP_ALLOW,
879 'teacher' => CAP_ALLOW,
880 'editingteacher' => CAP_ALLOW,
4f0c2d00 881 'manager' => CAP_ALLOW
165088f6 882 )
883 ),
f7c0d84b 884
885 'moodle/course:changefullname' => array(
886
cd7f72c0 887 'riskbitmask' => RISK_XSS,
888
f7c0d84b 889 'captype' => 'write',
890 'contextlevel' => CONTEXT_COURSE,
31c93303 891 'archetypes' => array(
f7c0d84b 892 'editingteacher' => CAP_ALLOW,
4f0c2d00 893 'manager' => CAP_ALLOW
5e99b9d7 894 ),
895 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 896 ),
897
898 'moodle/course:changeshortname' => array(
899
cd7f72c0 900 'riskbitmask' => RISK_XSS,
901
f7c0d84b 902 'captype' => 'write',
903 'contextlevel' => CONTEXT_COURSE,
31c93303 904 'archetypes' => array(
f7c0d84b 905 'editingteacher' => CAP_ALLOW,
4f0c2d00 906 'manager' => CAP_ALLOW
5e99b9d7 907 ),
908 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 909 ),
910
911 'moodle/course:changeidnumber' => array(
912
cd7f72c0 913 'riskbitmask' => RISK_XSS,
914
f7c0d84b 915 'captype' => 'write',
916 'contextlevel' => CONTEXT_COURSE,
31c93303 917 'archetypes' => array(
f7c0d84b 918 'editingteacher' => CAP_ALLOW,
4f0c2d00 919 'manager' => CAP_ALLOW
5e99b9d7 920 ),
921 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 922 ),
50569ba3 923 'moodle/course:changecategory' => array(
924 'riskbitmask' => RISK_XSS,
925
926 'captype' => 'write',
927 'contextlevel' => CONTEXT_COURSE,
31c93303 928 'archetypes' => array(
50569ba3 929 'editingteacher' => CAP_ALLOW,
4f0c2d00 930 'manager' => CAP_ALLOW
50569ba3 931 ),
932 'clonepermissionsfrom' => 'moodle/course:update'
933 ),
934
935 'moodle/course:changesummary' => array(
936 'riskbitmask' => RISK_XSS,
937
938 'captype' => 'write',
939 'contextlevel' => CONTEXT_COURSE,
31c93303 940 'archetypes' => array(
50569ba3 941 'editingteacher' => CAP_ALLOW,
4f0c2d00 942 'manager' => CAP_ALLOW
50569ba3 943 ),
944 'clonepermissionsfrom' => 'moodle/course:update'
945 ),
946
f7c0d84b 947
165088f6 948 'moodle/site:viewparticipants' => array(
949
950 'captype' => 'read',
951 'contextlevel' => CONTEXT_SYSTEM,
31c93303 952 'archetypes' => array(
4f0c2d00 953 'manager' => CAP_ALLOW
bbbf2d40 954 )
955 ),
eef868d1 956
bbbf2d40 957 'moodle/course:viewscales' => array(
eef868d1 958
bbbf2d40 959 'captype' => 'read',
960 'contextlevel' => CONTEXT_COURSE,
31c93303 961 'archetypes' => array(
bbbf2d40 962 'student' => CAP_ALLOW,
963 'teacher' => CAP_ALLOW,
964 'editingteacher' => CAP_ALLOW,
4f0c2d00 965 'manager' => CAP_ALLOW
bbbf2d40 966 )
967 ),
eef868d1 968
bbbf2d40 969 'moodle/course:managescales' => array(
eef868d1 970
bbbf2d40 971 'captype' => 'write',
972 'contextlevel' => CONTEXT_COURSE,
31c93303 973 'archetypes' => array(
bbbf2d40 974 'editingteacher' => CAP_ALLOW,
4f0c2d00 975 'manager' => CAP_ALLOW
bbbf2d40 976 )
977 ),
eef868d1 978
bbbf2d40 979 'moodle/course:managegroups' => array(
980
981 'captype' => 'write',
982 'contextlevel' => CONTEXT_COURSE,
31c93303 983 'archetypes' => array(
a028c291 984 'editingteacher' => CAP_ALLOW,
4f0c2d00 985 'manager' => CAP_ALLOW
a028c291 986 )
987 ),
eef868d1 988
a028c291 989 'moodle/course:reset' => array(
990
3a0c6cca 991 'riskbitmask' => RISK_DATALOSS,
992
a028c291 993 'captype' => 'write',
994 'contextlevel' => CONTEXT_COURSE,
31c93303 995 'archetypes' => array(
bbbf2d40 996 'editingteacher' => CAP_ALLOW,
4f0c2d00 997 'manager' => CAP_ALLOW
bbbf2d40 998 )
999 ),
eef868d1 1000
bbbf2d40 1001 'moodle/blog:view' => array(
1002
1003 'captype' => 'read',
05de723b 1004 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1005 'archetypes' => array(
05de723b
NC
1006 'guest' => CAP_ALLOW,
1007 'user' => CAP_ALLOW,
1008 'student' => CAP_ALLOW,
1009 'teacher' => CAP_ALLOW,
1010 'editingteacher' => CAP_ALLOW,
4f0c2d00 1011 'manager' => CAP_ALLOW
05de723b
NC
1012 )
1013 ),
1014
1015 'moodle/blog:search' => array(
1016 'captype' => 'read',
1017 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1018 'archetypes' => array(
00adf177 1019 'guest' => CAP_ALLOW,
c785d40a 1020 'user' => CAP_ALLOW,
bbbf2d40 1021 'student' => CAP_ALLOW,
1022 'teacher' => CAP_ALLOW,
1023 'editingteacher' => CAP_ALLOW,
4f0c2d00 1024 'manager' => CAP_ALLOW
bbbf2d40 1025 )
1026 ),
eef868d1 1027
05de723b
NC
1028 'moodle/blog:viewdrafts' => array(
1029
1030 'riskbitmask' => RISK_PERSONAL,
1031 'captype' => 'read',
1032 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1033 'archetypes' => array(
4f0c2d00 1034 'manager' => CAP_ALLOW
05de723b
NC
1035 )
1036 ),
1037
5a8ab2e9 1038 'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 1039
21b6db6e 1040 'riskbitmask' => RISK_SPAM,
1041
bbbf2d40 1042 'captype' => 'write',
1043 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1044 'archetypes' => array(
c785d40a 1045 'user' => CAP_ALLOW,
4f0c2d00 1046 'manager' => CAP_ALLOW
bbbf2d40 1047 )
1048 ),
eef868d1 1049
bbbf2d40 1050 'moodle/blog:manageentries' => array(
1051
21b6db6e 1052 'riskbitmask' => RISK_SPAM,
1053
bbbf2d40 1054 'captype' => 'write',
05de723b 1055 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1056 'archetypes' => array(
bbbf2d40 1057 'teacher' => CAP_ALLOW,
1058 'editingteacher' => CAP_ALLOW,
4f0c2d00 1059 'manager' => CAP_ALLOW
bbbf2d40 1060 )
1061 ),
05de723b 1062
cae83708 1063 'moodle/blog:manageexternal' => array(
1064
1065 'riskbitmask' => RISK_SPAM,
1066
1067 'captype' => 'write',
296f6c99 1068 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1069 'archetypes' => array(
cae83708 1070 'student' => CAP_ALLOW,
1071 'user' => CAP_ALLOW,
1072 'teacher' => CAP_ALLOW,
1073 'editingteacher' => CAP_ALLOW,
4f0c2d00 1074 'manager' => CAP_ALLOW
cae83708 1075 )
1076 ),
1077
05de723b
NC
1078 'moodle/blog:associatecourse' => array(
1079
1080 'captype' => 'write',
1081 'contextlevel' => CONTEXT_COURSE,
31c93303 1082 'archetypes' => array(
05de723b
NC
1083 'student' => CAP_ALLOW,
1084 'user' => CAP_ALLOW,
1085 'teacher' => CAP_ALLOW,
1086 'editingteacher' => CAP_ALLOW,
4f0c2d00 1087 'manager' => CAP_ALLOW
05de723b
NC
1088 )
1089 ),
1090
1091 'moodle/blog:associatemodule' => array(
1092
1093 'captype' => 'write',
1094 'contextlevel' => CONTEXT_MODULE,
31c93303 1095 'archetypes' => array(
05de723b
NC
1096 'student' => CAP_ALLOW,
1097 'user' => CAP_ALLOW,
1098 'teacher' => CAP_ALLOW,
1099 'editingteacher' => CAP_ALLOW,
4f0c2d00 1100 'manager' => CAP_ALLOW
05de723b
NC
1101 )
1102 ),
eef868d1 1103
5a8ab2e9 1104 'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 1105
21b6db6e 1106 'riskbitmask' => RISK_SPAM,
1107
bbbf2d40 1108 'captype' => 'write',
f432bebf 1109 'contextlevel' => CONTEXT_COURSE,
31c93303 1110 'archetypes' => array(
c785d40a 1111 'user' => CAP_ALLOW,
4f0c2d00 1112 'manager' => CAP_ALLOW
bbbf2d40 1113 )
1114 ),
eef868d1 1115
f63d2922 1116 'moodle/calendar:managegroupentries' => array(
1117
1118 'riskbitmask' => RISK_SPAM,
1119
1120 'captype' => 'write',
f432bebf 1121 'contextlevel' => CONTEXT_COURSE,
31c93303 1122 'archetypes' => array(
f63d2922 1123 'teacher' => CAP_ALLOW,
1124 'editingteacher' => CAP_ALLOW,
4f0c2d00 1125 'manager' => CAP_ALLOW
f63d2922 1126 )
1127 ),
1128
bbbf2d40 1129 'moodle/calendar:manageentries' => array(
1130
21b6db6e 1131 'riskbitmask' => RISK_SPAM,
1132
bbbf2d40 1133 'captype' => 'write',
f432bebf 1134 'contextlevel' => CONTEXT_COURSE,
31c93303 1135 'archetypes' => array(
bbbf2d40 1136 'teacher' => CAP_ALLOW,
1137 'editingteacher' => CAP_ALLOW,
4f0c2d00 1138 'manager' => CAP_ALLOW
bbbf2d40 1139 )
77d4953e 1140 ),
a044c05d 1141
1142 'moodle/user:editprofile' => array(
1143
3a0c6cca 1144 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
a044c05d 1145
1146 'captype' => 'write',
1147 'contextlevel' => CONTEXT_USER,
31c93303 1148 'archetypes' => array(
4f0c2d00 1149 'manager' => CAP_ALLOW
a044c05d 1150 )
1151 ),
eef868d1 1152
a5b8be62 1153 'moodle/user:editownprofile' => array(
1cb3da36 1154
3a0c6cca 1155 'riskbitmask' => RISK_SPAM,
1156
a5b8be62 1157 'captype' => 'write',
1158 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1159 'archetypes' => array(
1cb3da36 1160 'guest' => CAP_PROHIBIT,
1161 'user' => CAP_ALLOW,
4f0c2d00 1162 'manager' => CAP_ALLOW
a5b8be62 1163 )
1cb3da36 1164 ),
1165
a5b8be62 1166 'moodle/user:changeownpassword' => array(
1cb3da36 1167
a5b8be62 1168 'captype' => 'write',
1169 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1170 'archetypes' => array(
1cb3da36 1171 'guest' => CAP_PROHIBIT,
1172 'user' => CAP_ALLOW,
4f0c2d00 1173 'manager' => CAP_ALLOW
a5b8be62 1174 )
1cb3da36 1175 ),
1176
eef868d1 1177 // The next 3 might make no sense for some roles, e.g teacher, etc.
77d4953e 1178 // since the next level up is site. These are more for the parent role
1179 'moodle/user:readuserposts' => array(
bcdb0f19 1180
77d4953e 1181 'captype' => 'read',
4b10f08b 1182 'contextlevel' => CONTEXT_USER,
31c93303 1183 'archetypes' => array(
77d4953e 1184 'student' => CAP_ALLOW,
1185 'teacher' => CAP_ALLOW,
1186 'editingteacher' => CAP_ALLOW,
4f0c2d00 1187 'manager' => CAP_ALLOW
77d4953e 1188 )
1189 ),
eef868d1 1190
77d4953e 1191 'moodle/user:readuserblogs' => array(
bcdb0f19 1192
77d4953e 1193 'captype' => 'read',
4b10f08b 1194 'contextlevel' => CONTEXT_USER,
31c93303 1195 'archetypes' => array(
77d4953e 1196 'student' => CAP_ALLOW,
1197 'teacher' => CAP_ALLOW,
1198 'editingteacher' => CAP_ALLOW,
4f0c2d00 1199 'manager' => CAP_ALLOW
77d4953e 1200 )
1201 ),
eef868d1 1202
3c7da16d 1203 // designed for parent role - not used in legacy roles
77d4953e 1204 'moodle/user:viewuseractivitiesreport' => array(
3c7da16d 1205 'riskbitmask' => RISK_PERSONAL,
bcdb0f19 1206
77d4953e 1207 'captype' => 'read',
4b10f08b 1208 'contextlevel' => CONTEXT_USER,
31c93303 1209 'archetypes' => array(
77d4953e 1210 )
945f88ca 1211 ),
4e781c7b 1212
3b120e46 1213 //capabilities designed for the new message system configuration
1214 'moodle/user:editmessageprofile' => array(
f7c0d84b 1215
3b120e46 1216 'riskbitmask' => RISK_SPAM,
f7c0d84b 1217
3b120e46 1218 'captype' => 'write',
1219 'contextlevel' => CONTEXT_USER,
31c93303 1220 'archetypes' => array(
4f0c2d00 1221 'manager' => CAP_ALLOW
3b120e46 1222 )
1223 ),
f7c0d84b 1224
1225 'moodle/user:editownmessageprofile' => array(
1226
1227 'captype' => 'write',
1228 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1229 'archetypes' => array(
3b120e46 1230 'guest' => CAP_PROHIBIT,
1231 'user' => CAP_ALLOW,
4f0c2d00 1232 'manager' => CAP_ALLOW
f7c0d84b 1233 )
3b120e46 1234 ),
eef868d1 1235
271e6dec 1236 'moodle/question:managecategory' => array(
14d701d6 1237 'riskbitmask' => RISK_SPAM | RISK_XSS,
945f88ca 1238 'captype' => 'write',
1239 'contextlevel' => CONTEXT_COURSE,
31c93303 1240 'archetypes' => array(
945f88ca 1241 'editingteacher' => CAP_ALLOW,
4f0c2d00 1242 'manager' => CAP_ALLOW
945f88ca 1243 )
a5b8be62 1244 ),
1245
271e6dec 1246 //new in moodle 1.9
1247 'moodle/question:add' => array(
14d701d6 1248 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 1249 'captype' => 'write',
1250 'contextlevel' => CONTEXT_COURSE,
31c93303 1251 'archetypes' => array(
271e6dec 1252 'editingteacher' => CAP_ALLOW,
4f0c2d00 1253 'manager' => CAP_ALLOW
271e6dec 1254 ),
1255 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1256 ),
271e6dec 1257 'moodle/question:editmine' => array(
14d701d6 1258 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 1259 'captype' => 'write',
1260 'contextlevel' => CONTEXT_COURSE,
31c93303 1261 'archetypes' => array(
271e6dec 1262 'editingteacher' => CAP_ALLOW,
4f0c2d00 1263 'manager' => CAP_ALLOW
271e6dec 1264 ),
a5b8be62 1265 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1266 ),
1267 'moodle/question:editall' => array(
14d701d6 1268 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 1269 'captype' => 'write',
1270 'contextlevel' => CONTEXT_COURSE,
31c93303 1271 'archetypes' => array(
271e6dec 1272 'editingteacher' => CAP_ALLOW,
4f0c2d00 1273 'manager' => CAP_ALLOW
271e6dec 1274 ),
a5b8be62 1275 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1276 ),
1277 'moodle/question:viewmine' => array(
945f88ca 1278 'captype' => 'read',
1279 'contextlevel' => CONTEXT_COURSE,
31c93303 1280 'archetypes' => array(
945f88ca 1281 'editingteacher' => CAP_ALLOW,
4f0c2d00 1282 'manager' => CAP_ALLOW
271e6dec 1283 ),
a5b8be62 1284 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1285 ),
271e6dec 1286 'moodle/question:viewall' => array(
1287 'captype' => 'read',
1288 'contextlevel' => CONTEXT_COURSE,
31c93303 1289 'archetypes' => array(
271e6dec 1290 'editingteacher' => CAP_ALLOW,
4f0c2d00 1291 'manager' => CAP_ALLOW
271e6dec 1292 ),
a5b8be62 1293 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1294 ),
1295 'moodle/question:usemine' => array(
1296 'captype' => 'read',
1297 'contextlevel' => CONTEXT_COURSE,
31c93303 1298 'archetypes' => array(
271e6dec 1299 'editingteacher' => CAP_ALLOW,
4f0c2d00 1300 'manager' => CAP_ALLOW
271e6dec 1301 ),
a5b8be62 1302 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1303 ),
1304 'moodle/question:useall' => array(
1305 'captype' => 'read',
1306 'contextlevel' => CONTEXT_COURSE,
31c93303 1307 'archetypes' => array(
271e6dec 1308 'editingteacher' => CAP_ALLOW,
4f0c2d00 1309 'manager' => CAP_ALLOW
271e6dec 1310 ),
a5b8be62 1311 'clonepermissionsfrom' => 'moodle/question:manage'
1312 ),
271e6dec 1313 'moodle/question:movemine' => array(
945f88ca 1314 'captype' => 'write',
1315 'contextlevel' => CONTEXT_COURSE,
31c93303 1316 'archetypes' => array(
945f88ca 1317 'editingteacher' => CAP_ALLOW,
4f0c2d00 1318 'manager' => CAP_ALLOW
271e6dec 1319 ),
a5b8be62 1320 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1321 ),
271e6dec 1322 'moodle/question:moveall' => array(
945f88ca 1323 'captype' => 'write',
1324 'contextlevel' => CONTEXT_COURSE,
31c93303 1325 'archetypes' => array(
945f88ca 1326 'editingteacher' => CAP_ALLOW,
4f0c2d00 1327 'manager' => CAP_ALLOW
271e6dec 1328 ),
a5b8be62 1329 'clonepermissionsfrom' => 'moodle/question:manage'
7191a1fa 1330 ),
271e6dec 1331 //END new in moodle 1.9
a5b8be62 1332
0eb6b04a 1333 // Configure the installed question types.
1334 'moodle/question:config' => array(
0eb6b04a 1335 'riskbitmask' => RISK_CONFIG,
0eb6b04a 1336 'captype' => 'write',
1337 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1338 'archetypes' => array(
4f0c2d00 1339 'manager' => CAP_ALLOW
0eb6b04a 1340 )
1341 ),
1342
62e76c67 1343 // While attempting questions, the ability to flag particular questions for later reference.
1344 'moodle/question:flag' => array(
1345 'captype' => 'write',
1346 'contextlevel' => CONTEXT_COURSE,
31c93303 1347 'archetypes' => array(
62e76c67 1348 'student' => CAP_ALLOW,
1349 'teacher' => CAP_ALLOW,
1350 'editingteacher' => CAP_ALLOW,
4f0c2d00 1351 'manager' => CAP_ALLOW
62e76c67 1352 )
1353 ),
bcdb0f19 1354
62e76c67 1355 'moodle/site:doclinks' => array(
7191a1fa 1356 'captype' => 'read',
1357 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1358 'archetypes' => array(
7191a1fa 1359 'teacher' => CAP_ALLOW,
1360 'editingteacher' => CAP_ALLOW,
4f0c2d00 1361 'manager' => CAP_ALLOW
7191a1fa 1362 )
3924b988 1363 ),
eef868d1 1364
3924b988 1365 'moodle/course:sectionvisibility' => array(
bcdb0f19 1366
3924b988 1367 'captype' => 'write',
1368 'contextlevel' => CONTEXT_COURSE,
31c93303 1369 'archetypes' => array(
3924b988 1370 'editingteacher' => CAP_ALLOW,
4f0c2d00 1371 'manager' => CAP_ALLOW
3924b988 1372 )
1373 ),
eef868d1 1374
dc558690 1375 'moodle/course:useremail' => array(
bcdb0f19 1376
dc558690 1377 'captype' => 'write',
1378 'contextlevel' => CONTEXT_COURSE,
31c93303 1379 'archetypes' => array(
dc558690 1380 'editingteacher' => CAP_ALLOW,
4f0c2d00 1381 'manager' => CAP_ALLOW
dc558690 1382 )
1383 ),
eef868d1 1384
3924b988 1385 'moodle/course:viewhiddensections' => array(
bcdb0f19 1386
3924b988 1387 'captype' => 'write',
1388 'contextlevel' => CONTEXT_COURSE,
31c93303 1389 'archetypes' => array(
3924b988 1390 'editingteacher' => CAP_ALLOW,
4f0c2d00 1391 'manager' => CAP_ALLOW
3924b988 1392 )
1393 ),
eef868d1 1394
3924b988 1395 'moodle/course:setcurrentsection' => array(
bcdb0f19 1396
3924b988 1397 'captype' => 'write',
1398 'contextlevel' => CONTEXT_COURSE,
31c93303 1399 'archetypes' => array(
3924b988 1400 'editingteacher' => CAP_ALLOW,
4f0c2d00 1401 'manager' => CAP_ALLOW
3924b988 1402 )
1403 ),
eef868d1 1404
dd45888a 1405 'moodle/site:mnetlogintoremote' => array(
bc4c9800 1406
3924b988 1407 'captype' => 'read',
dd45888a 1408 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1409 'archetypes' => array(
3924b988 1410 )
1411 ),
eef868d1 1412
dd45888a 1413 'moodle/grade:viewall' => array(
bcdb0f19 1414 'riskbitmask' => RISK_PERSONAL,
dd45888a 1415 'captype' => 'read',
eecf76df 1416 'contextlevel' => CONTEXT_COURSE, // and CONTEXT_USER
31c93303 1417 'archetypes' => array(
dd45888a 1418 'teacher' => CAP_ALLOW,
3924b988 1419 'editingteacher' => CAP_ALLOW,
4f0c2d00 1420 'manager' => CAP_ALLOW
dd45888a 1421 ),
1422 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
f509ce06 1423 ),
f43ce1ad 1424
dd45888a 1425 'moodle/grade:view' => array(
f509ce06 1426 'captype' => 'read',
eecf76df 1427 'contextlevel' => CONTEXT_COURSE,
31c93303 1428 'archetypes' => array(
dd45888a 1429 'student' => CAP_ALLOW
f509ce06 1430 )
ca9ffa18 1431 ),
dd45888a 1432
1433 'moodle/grade:viewhidden' => array(
ca9ffa18 1434 'riskbitmask' => RISK_PERSONAL,
1435 'captype' => 'read',
eecf76df 1436 'contextlevel' => CONTEXT_COURSE,
31c93303 1437 'archetypes' => array(
0371f8e5 1438 'teacher' => CAP_ALLOW,
1439 'editingteacher' => CAP_ALLOW,
4f0c2d00 1440 'manager' => CAP_ALLOW
dd45888a 1441 ),
1442 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
ca9ffa18 1443 ),
dd45888a 1444
1445 'moodle/grade:import' => array(
3a0c6cca 1446 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1447 'captype' => 'write',
ca9ffa18 1448 'contextlevel' => CONTEXT_COURSE,
31c93303 1449 'archetypes' => array(
ca9ffa18 1450 'editingteacher' => CAP_ALLOW,
4f0c2d00 1451 'manager' => CAP_ALLOW
dd45888a 1452 ),
1453 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1454 ),
dd45888a 1455
1456 'moodle/grade:export' => array(
ca9ffa18 1457 'riskbitmask' => RISK_PERSONAL,
1458 'captype' => 'read',
1459 'contextlevel' => CONTEXT_COURSE,
31c93303 1460 'archetypes' => array(
ca9ffa18 1461 'teacher' => CAP_ALLOW,
1462 'editingteacher' => CAP_ALLOW,
4f0c2d00 1463 'manager' => CAP_ALLOW
dd45888a 1464 ),
1465 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1466 ),
dd45888a 1467
1468 'moodle/grade:manage' => array(
3a0c6cca 1469 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1470 'captype' => 'write',
1471 'contextlevel' => CONTEXT_COURSE,
31c93303 1472 'archetypes' => array(
dd45888a 1473 'editingteacher' => CAP_ALLOW,
4f0c2d00 1474 'manager' => CAP_ALLOW
dd45888a 1475 ),
1476 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1477 ),
dd45888a 1478
a5b8be62 1479 'moodle/grade:edit' => array(
1480 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
04259694 1481 'captype' => 'write',
1482 'contextlevel' => CONTEXT_COURSE,
31c93303 1483 'archetypes' => array(
04259694 1484 'editingteacher' => CAP_ALLOW,
4f0c2d00 1485 'manager' => CAP_ALLOW
04259694 1486 ),
1487 'clonepermissionsfrom' => 'moodle/course:managegrades'
f25a5a32
DM
1488 ),
1489
1490 'moodle/grade:managegradingforms' => array(
1491 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
1492 'captype' => 'write',
553af5fd 1493 'contextlevel' => CONTEXT_COURSE,
f25a5a32
DM
1494 'archetypes' => array(
1495 'editingteacher' => CAP_ALLOW,
1496 'manager' => CAP_ALLOW
1497 ),
1498 'clonepermissionsfrom' => 'moodle/course:managegrades'
04259694 1499 ),
1500
553af5fd
DM
1501 'moodle/grade:sharegradingforms' => array(
1502 'riskbitmask' => RISK_SPAM,
1503 'captype' => 'write',
1504 'contextlevel' => CONTEXT_SYSTEM,
1505 'archetypes' => array(
1506 'manager' => CAP_ALLOW
1507 ),
1508 ),
1509
a5b8be62 1510 'moodle/grade:manageoutcomes' => array(
284abb09 1511 'captype' => 'write',
1512 'contextlevel' => CONTEXT_COURSE,
31c93303 1513 'archetypes' => array(
284abb09 1514 'editingteacher' => CAP_ALLOW,
4f0c2d00 1515 'manager' => CAP_ALLOW
284abb09 1516 ),
1517 'clonepermissionsfrom' => 'moodle/course:managegrades'
1518 ),
1519
1520 'moodle/grade:manageletters' => array(
ca9ffa18 1521 'captype' => 'write',
1522 'contextlevel' => CONTEXT_COURSE,
31c93303 1523 'archetypes' => array(
ca9ffa18 1524 'editingteacher' => CAP_ALLOW,
4f0c2d00 1525 'manager' => CAP_ALLOW
a5b8be62 1526 ),
1527 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1528 ),
dd45888a 1529
a5b8be62 1530 'moodle/grade:hide' => 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 )
1537 ),
dd45888a 1538
a5b8be62 1539 'moodle/grade:lock' => array(
dd45888a 1540 'captype' => 'write',
ca9ffa18 1541 'contextlevel' => CONTEXT_COURSE,
31c93303 1542 'archetypes' => array(
ca9ffa18 1543 'editingteacher' => CAP_ALLOW,
4f0c2d00 1544 'manager' => CAP_ALLOW
ca9ffa18 1545 )
1546 ),
dd45888a 1547
a5b8be62 1548 'moodle/grade:unlock' => array(
ca9ffa18 1549 'captype' => 'write',
1550 'contextlevel' => CONTEXT_COURSE,
31c93303 1551 'archetypes' => array(
ca9ffa18 1552 'editingteacher' => CAP_ALLOW,
4f0c2d00 1553 'manager' => CAP_ALLOW
ca9ffa18 1554 )
282c1695 1555 ),
dd45888a 1556
1557 'moodle/my:manageblocks' => array(
282c1695 1558 'captype' => 'write',
1559 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1560 'archetypes' => array(
282c1695 1561 'user' => CAP_ALLOW
1562 )
eca3af25 1563 ),
dd45888a 1564
eca3af25 1565 'moodle/notes:view' => array(
1566 'captype' => 'read',
f432bebf 1567 'contextlevel' => CONTEXT_COURSE,
31c93303 1568 'archetypes' => array(
eca3af25 1569 'teacher' => CAP_ALLOW,
1570 'editingteacher' => CAP_ALLOW,
4f0c2d00 1571 'manager' => CAP_ALLOW
eca3af25 1572 )
1573 ),
1574
1575 'moodle/notes:manage' => array(
3a0c6cca 1576 'riskbitmask' => RISK_SPAM,
1577
eca3af25 1578 'captype' => 'write',
f432bebf 1579 'contextlevel' => CONTEXT_COURSE,
31c93303 1580 'archetypes' => array(
eca3af25 1581 'teacher' => CAP_ALLOW,
1582 'editingteacher' => CAP_ALLOW,
4f0c2d00 1583 'manager' => CAP_ALLOW
eca3af25 1584 )
dd45888a 1585 ),
79642064 1586
1587 'moodle/tag:manage' => array(
3a0c6cca 1588 'riskbitmask' => RISK_SPAM,
1589
79642064 1590 'captype' => 'write',
1591 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1592 'archetypes' => array(
79642064 1593 'teacher' => CAP_ALLOW,
1594 'editingteacher' => CAP_ALLOW,
4f0c2d00 1595 'manager' => CAP_ALLOW
79642064 1596 )
705789bd 1597 ),
1598
1599 'moodle/tag:create' => array(
3a0c6cca 1600 'riskbitmask' => RISK_SPAM,
1601
705789bd 1602 'captype' => 'write',
1603 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1604 'archetypes' => array(
4f0c2d00 1605 'manager' => CAP_ALLOW,
0f07c40e 1606 'user' => CAP_ALLOW
705789bd 1607 )
1608 ),
a5b8be62 1609
705789bd 1610 'moodle/tag:edit' => array(
3a0c6cca 1611 'riskbitmask' => RISK_SPAM,
1612
705789bd 1613 'captype' => 'write',
1614 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1615 'archetypes' => array(
4f0c2d00 1616 'manager' => CAP_ALLOW,
3e6e529f 1617 'user' => CAP_ALLOW
98b5789d 1618 )
1619 ),
a5b8be62 1620
98b5789d 1621 'moodle/tag:editblocks' => array(
1622 'captype' => 'write',
1623 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1624 'archetypes' => array(
705789bd 1625 'teacher' => CAP_ALLOW,
1626 'editingteacher' => CAP_ALLOW,
4f0c2d00 1627 'manager' => CAP_ALLOW
705789bd 1628 )
7e874772 1629 ),
1630
1631 'moodle/block:view' => array(
1632 'captype' => 'read',
1633 'contextlevel' => CONTEXT_BLOCK,
31c93303 1634 'archetypes' => array(
7e874772 1635 'guest' => CAP_ALLOW,
25a7d980 1636 'user' => CAP_ALLOW,
1637 'student' => CAP_ALLOW,
1638 'teacher' => CAP_ALLOW,
1639 'editingteacher' => CAP_ALLOW,
7e874772 1640 )
8512f577 1641 ),
1642
d14edf06 1643 'moodle/block:edit' => array(
1644 'riskbitmask' => RISK_SPAM | RISK_XSS,
1645
1646 'captype' => 'write',
1647 'contextlevel' => CONTEXT_BLOCK,
31c93303 1648 'archetypes' => array(
d14edf06 1649 'editingteacher' => CAP_ALLOW,
d14edf06 1650 )
1651 ),
1652
8512f577 1653 'moodle/portfolio:export' => array(
1654 'captype' => 'read',
1655 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1656 'archetypes' => array(
8512f577 1657 'user' => CAP_ALLOW,
1658 'student' => CAP_ALLOW,
1659 'teacher' => CAP_ALLOW,
1660 'editingteacher' => CAP_ALLOW,
8512f577 1661 )
1bcb7eb5 1662 ),
1663 'moodle/comment:view' => array(
1bcb7eb5 1664 'captype' => 'read',
ad0ae261 1665 'contextlevel' => CONTEXT_COURSE,
31c93303 1666 'archetypes' => array(
b3da2877
SH
1667 'frontpage' => CAP_ALLOW,
1668 'guest' => CAP_ALLOW,
1bcb7eb5 1669 'user' => CAP_ALLOW,
1670 'student' => CAP_ALLOW,
1671 'teacher' => CAP_ALLOW,
1672 'editingteacher' => CAP_ALLOW,
4f0c2d00 1673 'manager' => CAP_ALLOW
1bcb7eb5 1674 )
1675 ),
1676 'moodle/comment:post' => array(
1677
1678 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
1679 'captype' => 'write',
ad0ae261 1680 'contextlevel' => CONTEXT_COURSE,
31c93303 1681 'archetypes' => array(
1bcb7eb5 1682 'user' => CAP_ALLOW,
1683 'student' => CAP_ALLOW,
1684 'teacher' => CAP_ALLOW,
1685 'editingteacher' => CAP_ALLOW,
4f0c2d00 1686 'manager' => CAP_ALLOW
1bcb7eb5 1687 )
1688 ),
1689 'moodle/comment:delete' => array(
1690
1691 'riskbitmask' => RISK_DATALOSS,
1692 'captype' => 'write',
ad0ae261 1693 'contextlevel' => CONTEXT_COURSE,
31c93303 1694 'archetypes' => array(
1bcb7eb5 1695 'editingteacher' => CAP_ALLOW,
4f0c2d00 1696 'manager' => CAP_ALLOW
1bcb7eb5 1697 )
5eacbd4b 1698 ),
1699 'moodle/webservice:createtoken' => array(
1700
52dd27bf 1701 'riskbitmask' => RISK_CONFIG | RISK_DATALOSS | RISK_SPAM | RISK_PERSONAL | RISK_XSS,
5eacbd4b 1702 'captype' => 'write',
1703 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1704 'archetypes' => array(
4f0c2d00 1705 'manager' => CAP_ALLOW
5eacbd4b 1706 )
a09aeee4 1707 ),
13ea96c4
DC
1708 'moodle/webservice:createmobiletoken' => array(
1709
f2eac756 1710 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
13ea96c4
DC
1711 'captype' => 'write',
1712 'contextlevel' => CONTEXT_SYSTEM,
1713 'archetypes' => array(
1714 'user' => CAP_ALLOW
1715 )
1716 ),
19fae119 1717 'moodle/rating:view' => array(
ad0ae261 1718
a09aeee4 1719 'captype' => 'read',
ad0ae261 1720 'contextlevel' => CONTEXT_COURSE,
31c93303 1721 'archetypes' => array(
ad0ae261 1722 'user' => CAP_ALLOW,
e116a818
AD
1723 'student' => CAP_ALLOW,
1724 'teacher' => CAP_ALLOW,
1725 'editingteacher' => CAP_ALLOW,
4f0c2d00 1726 'manager' => CAP_ALLOW
a09aeee4
AD
1727 )
1728 ),
6595a568 1729 'moodle/rating:viewany' => array(
ad0ae261 1730
6595a568
MD
1731 'riskbitmask' => RISK_PERSONAL,
1732 'captype' => 'read',
ad0ae261 1733 'contextlevel' => CONTEXT_COURSE,
31c93303 1734 'archetypes' => array(
ad0ae261 1735 'user' => CAP_ALLOW,
6595a568
MD
1736 'student' => CAP_ALLOW,
1737 'teacher' => CAP_ALLOW,
1738 'editingteacher' => CAP_ALLOW,
1739 'manager' => CAP_ALLOW
1740 )
1741 ),
19fae119 1742 'moodle/rating:viewall' => array(
ad0ae261 1743
a09aeee4
AD
1744 'riskbitmask' => RISK_PERSONAL,
1745 'captype' => 'read',
ad0ae261 1746 'contextlevel' => CONTEXT_COURSE,
31c93303 1747 'archetypes' => array(
ad0ae261 1748 'user' => CAP_ALLOW,
6595a568 1749 'student' => CAP_ALLOW,
e116a818
AD
1750 'teacher' => CAP_ALLOW,
1751 'editingteacher' => CAP_ALLOW,
4f0c2d00 1752 'manager' => CAP_ALLOW
a09aeee4
AD
1753 )
1754 ),
19fae119 1755 'moodle/rating:rate' => array(
ad0ae261 1756
a09aeee4 1757 'captype' => 'write',
ad0ae261 1758 'contextlevel' => CONTEXT_COURSE,
31c93303 1759 'archetypes' => array(
ad0ae261 1760 'user' => CAP_ALLOW,
6595a568 1761 'student' => CAP_ALLOW,
e116a818
AD
1762 'teacher' => CAP_ALLOW,
1763 'editingteacher' => CAP_ALLOW,
4f0c2d00 1764 'manager' => CAP_ALLOW
a09aeee4 1765 )
07ab0c80 1766 ),
1767 'moodle/course:publish' => array(
1768
07ab0c80 1769 'captype' => 'write',
ad0ae261 1770 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
07ab0c80 1771 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1772 'archetypes' => array(
07ab0c80 1773 'manager' => CAP_ALLOW
1774 )
2be4d090
MD
1775 ),
1776 'moodle/course:markcomplete' => array(
1777 'captype' => 'write',
1778 'contextlevel' => CONTEXT_COURSE,
31c93303 1779 'archetypes' => array(
2be4d090
MD
1780 'teacher' => CAP_ALLOW,
1781 'editingteacher' => CAP_ALLOW,
2be4d090
MD
1782 'manager' => CAP_ALLOW
1783 )
755f96f8 1784 ),
1785 'moodle/community:add' => array(
1786 'captype' => 'write',
1787 'contextlevel' => CONTEXT_SYSTEM,
1788 'archetypes' => array(
1789 'manager' => CAP_ALLOW,
1790 'teacher' => CAP_ALLOW,
17957b8f 1791 'editingteacher' => CAP_ALLOW,
755f96f8 1792 )
1793 ),
1794 'moodle/community:download' => array(
1795 'captype' => 'write',
1796 'contextlevel' => CONTEXT_SYSTEM,
1797 'archetypes' => array(
1798 'manager' => CAP_ALLOW,
17957b8f 1799 'editingteacher' => CAP_ALLOW,
755f96f8 1800 )
79642064 1801 )
bbbf2d40 1802);