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