Make comment clearer.
[moodle.git] / lib / db / access.php
CommitLineData
14d701d6 1<?php // $Id$
bbbf2d40 2//
3// Capability definitions for Moodle core.
4//
5// The capabilities are loaded into the database table when the module is
6// installed or updated. Whenever the capability definitions are updated,
7// the module version number should be bumped up.
8//
9// The system has four possible values for a capability:
10// CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set).
11//
12//
13// CAPABILITY NAMING CONVENTION
14//
15// It is important that capability names are unique. The naming convention
16// for capabilities that are specific to modules and blocks is as follows:
17// [mod/block]/<component_name>:<capabilityname>
18//
19// component_name should be the same as the directory name of the mod or block.
20//
21// Core moodle capabilities are defined thus:
22// moodle/<capabilityclass>:<capabilityname>
23//
24// Examples: mod/forum:viewpost
25// block/recent_activity:view
26// moodle/site:deleteuser
27//
28// The variable name for the capability definitions array follows the format
29// $<componenttype>_<component_name>_capabilities
30//
31// For the core capabilities, the variable is $moodle_capabilities.
32
33
34$moodle_capabilities = array(
eef868d1 35
bbbf2d40 36 'moodle/site:doanything' => array(
bcdb0f19 37
f432bebf 38 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS,
bcdb0f19 39
bbbf2d40 40 'captype' => 'admin',
41 'contextlevel' => CONTEXT_SYSTEM
42 ),
eef868d1 43
bbbf2d40 44 'moodle/legacy:guest' => array(
bcdb0f19 45
bbbf2d40 46 'captype' => 'legacy',
47 'contextlevel' => CONTEXT_SYSTEM
48 ),
eef868d1 49
c785d40a 50 'moodle/legacy:user' => array(
51
52 'captype' => 'legacy',
53 'contextlevel' => CONTEXT_SYSTEM
54 ),
eef868d1 55
bbbf2d40 56 'moodle/legacy:student' => array(
bcdb0f19 57
21b6db6e 58 'riskbitmask' => RISK_SPAM,
bcdb0f19 59
bbbf2d40 60 'captype' => 'legacy',
61 'contextlevel' => CONTEXT_SYSTEM
62 ),
eef868d1 63
64
bbbf2d40 65 'moodle/legacy:teacher' => array(
bcdb0f19 66
21b6db6e 67 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
bcdb0f19 68
bbbf2d40 69 'captype' => 'legacy',
70 'contextlevel' => CONTEXT_SYSTEM
71 ),
eef868d1 72
73
bbbf2d40 74 'moodle/legacy:editingteacher' => array(
bcdb0f19 75
21b6db6e 76 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
bcdb0f19 77
bbbf2d40 78 'captype' => 'legacy',
79 'contextlevel' => CONTEXT_SYSTEM
80 ),
eef868d1 81
82
bbbf2d40 83 'moodle/legacy:coursecreator' => array(
bcdb0f19 84
21b6db6e 85 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
bcdb0f19 86
bbbf2d40 87 'captype' => 'legacy',
88 'contextlevel' => CONTEXT_SYSTEM
89 ),
eef868d1 90
91
bbbf2d40 92 'moodle/legacy:admin' => array(
bcdb0f19 93
f432bebf 94 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS,
bcdb0f19 95
bbbf2d40 96 'captype' => 'legacy',
97 'contextlevel' => CONTEXT_SYSTEM
98 ),
eef868d1 99
100
bbbf2d40 101 'moodle/site:config' => array(
eef868d1 102
f432bebf 103 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS,
21b6db6e 104
bbbf2d40 105 'captype' => 'write',
106 'contextlevel' => CONTEXT_SYSTEM,
107 'legacy' => array(
bbbf2d40 108 'admin' => CAP_ALLOW
109 )
110 ),
eef868d1 111
51792df0 112 'moodle/site:readallmessages' => array(
eef868d1 113
bcdb0f19 114 'riskbitmask' => RISK_PERSONAL,
115
51792df0 116 'captype' => 'read',
117 'contextlevel' => CONTEXT_SYSTEM,
118 'legacy' => array(
4b7ae3c4 119 'admin' => CAP_ALLOW,
120 'editingteacher' => CAP_ALLOW
51792df0 121 )
122 ),
576ad290 123
124 'moodle/site:sendmessage' => array(
125
3a0c6cca 126 'riskbitmask' => RISK_SPAM,
576ad290 127
128 'captype' => 'write',
129 'contextlevel' => CONTEXT_SYSTEM,
130 'legacy' => array(
131 'admin' => CAP_ALLOW,
132 'user' => CAP_ALLOW
133 )
134 ),
eef868d1 135
51792df0 136 'moodle/site:approvecourse' => array(
eef868d1 137
bcdb0f19 138 'riskbitmask' => RISK_XSS,
139
51792df0 140 'captype' => 'write',
141 'contextlevel' => CONTEXT_SYSTEM,
142 'legacy' => array(
51792df0 143 'admin' => CAP_ALLOW
144 )
145 ),
eef868d1 146
bbbf2d40 147 'moodle/site:import' => array(
eef868d1 148
21b6db6e 149 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
150
bbbf2d40 151 'captype' => 'write',
f432bebf 152 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 153 'legacy' => array(
a028c291 154 'editingteacher' => CAP_ALLOW,
bbbf2d40 155 'admin' => CAP_ALLOW
156 )
157 ),
eef868d1 158
bbbf2d40 159 'moodle/site:backup' => array(
eef868d1 160
21b6db6e 161 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
162
bbbf2d40 163 'captype' => 'write',
f432bebf 164 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 165 'legacy' => array(
7246585a 166 'editingteacher' => CAP_ALLOW,
bbbf2d40 167 'admin' => CAP_ALLOW
168 )
169 ),
eef868d1 170
172dd12c 171 'moodle/site:backupdownload' => array(
172
173 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
174
175 'captype' => 'write',
176 'contextlevel' => CONTEXT_COURSE,
177 'legacy' => array(
178 'editingteacher' => CAP_ALLOW,
179 'admin' => CAP_ALLOW
180 ),
181
182 'clonepermissionsfrom' => 'moodle/site:backup'
183 ),
184
185 'moodle/site:backupupload' => array(
186
187 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
188
189 'captype' => 'write',
190 'contextlevel' => CONTEXT_COURSE,
191 'legacy' => array(
192 'editingteacher' => CAP_ALLOW,
193 'admin' => CAP_ALLOW
194 ),
195
196 'clonepermissionsfrom' => 'moodle/site:restore'
197 ),
198
bbbf2d40 199 'moodle/site:restore' => array(
eef868d1 200
21b6db6e 201 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
202
bbbf2d40 203 'captype' => 'write',
f432bebf 204 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 205 'legacy' => array(
7246585a 206 'editingteacher' => CAP_ALLOW,
bbbf2d40 207 'admin' => CAP_ALLOW
208 )
209 ),
eef868d1 210
bbbf2d40 211 'moodle/site:manageblocks' => array(
eef868d1 212
21b6db6e 213 'riskbitmask' => RISK_SPAM | RISK_XSS,
214
bbbf2d40 215 'captype' => 'write',
f432bebf 216 'contextlevel' => CONTEXT_BLOCK,
bbbf2d40 217 'legacy' => array(
73b73d21 218 'editingteacher' => CAP_ALLOW,
bbbf2d40 219 'admin' => CAP_ALLOW
220 )
221 ),
eef868d1 222
27950688 223 'moodle/site:accessallgroups' => array(
eef868d1 224
27950688 225 'captype' => 'read',
f432bebf 226 'contextlevel' => CONTEXT_COURSE,
27950688 227 'legacy' => array(
27950688 228 'teacher' => CAP_ALLOW,
229 'editingteacher' => CAP_ALLOW,
27950688 230 'admin' => CAP_ALLOW
231 )
232 ),
eef868d1 233
53d7785b 234 'moodle/site:viewfullnames' => array(
eef868d1 235
53d7785b 236 'captype' => 'read',
f432bebf 237 'contextlevel' => CONTEXT_COURSE,
53d7785b 238 'legacy' => array(
53d7785b 239 'teacher' => CAP_ALLOW,
240 'editingteacher' => CAP_ALLOW,
53d7785b 241 'admin' => CAP_ALLOW
242 )
243 ),
eef868d1 244
a028c291 245 'moodle/site:viewreports' => array(
eef868d1 246
21b6db6e 247 'riskbitmask' => RISK_PERSONAL,
248
a028c291 249 'captype' => 'read',
f432bebf 250 'contextlevel' => CONTEXT_COURSE,
a028c291 251 'legacy' => array(
a028c291 252 'teacher' => CAP_ALLOW,
253 'editingteacher' => CAP_ALLOW,
a028c291 254 'admin' => CAP_ALLOW
255 )
256 ),
eef868d1 257
7d8a3cb0 258 'moodle/site:trustcontent' => array(
eef868d1 259
21b6db6e 260 'riskbitmask' => RISK_XSS,
261
7d8a3cb0 262 'captype' => 'write',
f432bebf 263 'contextlevel' => CONTEXT_COURSE,
7d8a3cb0 264 'legacy' => array(
7d8a3cb0 265 'editingteacher' => CAP_ALLOW,
7d8a3cb0 266 'admin' => CAP_ALLOW
267 )
268 ),
eef868d1 269
6df3c7df 270 'moodle/site:uploadusers' => array(
eef868d1 271
21b6db6e 272 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
273
bbbf2d40 274 'captype' => 'write',
275 'contextlevel' => CONTEXT_SYSTEM,
276 'legacy' => array(
bbbf2d40 277 'admin' => CAP_ALLOW
278 )
279 ),
eef868d1 280
2a55410b 281 'moodle/site:langeditmaster' => array(
282
283 'riskbitmask' => RISK_CONFIG | RISK_XSS,
284
285 'captype' => 'write',
286 'contextlevel' => CONTEXT_SYSTEM,
287 'legacy' => array(
288 'admin' => CAP_PREVENT
289 )
290 ),
291
292 'moodle/site:langeditlocal' => array(
293
294 'riskbitmask' => RISK_CONFIG | RISK_XSS,
295
296 'captype' => 'write',
297 'contextlevel' => CONTEXT_SYSTEM,
298 'legacy' => array(
299 'admin' => CAP_ALLOW
300 )
301 ),
302
6df3c7df 303
304 'moodle/user:create' => array(
305
306 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
eef868d1 307
bbbf2d40 308 'captype' => 'write',
309 'contextlevel' => CONTEXT_SYSTEM,
310 'legacy' => array(
bbbf2d40 311 'admin' => CAP_ALLOW
312 )
313 ),
eef868d1 314
6df3c7df 315 'moodle/user:delete' => array(
cc891abe 316
3a0c6cca 317 'riskbitmask' => RISK_PERSONAL, RISK_DATALOSS,
bcdb0f19 318
cc891abe 319 'captype' => 'write',
320 'contextlevel' => CONTEXT_SYSTEM,
321 'legacy' => array(
cc891abe 322 'admin' => CAP_ALLOW
323 )
324 ),
325
6df3c7df 326 'moodle/user:update' => array(
cc891abe 327
328 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
21b6db6e 329
bbbf2d40 330 'captype' => 'write',
331 'contextlevel' => CONTEXT_SYSTEM,
332 'legacy' => array(
bbbf2d40 333 'admin' => CAP_ALLOW
334 )
335 ),
eef868d1 336
bbbf2d40 337 'moodle/user:viewdetails' => array(
eef868d1 338
e58eca72 339 'captype' => 'read',
f432bebf 340 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 341 'legacy' => array(
22ae509e 342 'guest' => CAP_ALLOW,
343 'student' => CAP_ALLOW,
344 'teacher' => CAP_ALLOW,
345 'editingteacher' => CAP_ALLOW,
bbbf2d40 346 'admin' => CAP_ALLOW
347 )
348 ),
e58eca72 349
350 'moodle/user:viewhiddendetails' => array(
eef868d1 351
21b6db6e 352 'riskbitmask' => RISK_PERSONAL,
353
e58eca72 354 'captype' => 'read',
f432bebf 355 'contextlevel' => CONTEXT_COURSE,
e58eca72 356 'legacy' => array(
e58eca72 357 'teacher' => CAP_ALLOW,
358 'editingteacher' => CAP_ALLOW,
e58eca72 359 'admin' => CAP_ALLOW
360 )
361 ),
eef868d1 362
6c95827f 363 'moodle/user:loginas' => array(
364
365 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
366
367 'captype' => 'write',
368 'contextlevel' => CONTEXT_COURSE,
369 'legacy' => array(
6c95827f 370 'admin' => CAP_ALLOW
371 )
372 ),
373
bbbf2d40 374 'moodle/role:assign' => array(
eef868d1 375
3a0c6cca 376 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
377
bbbf2d40 378 'captype' => 'write',
f432bebf 379 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 380 'legacy' => array(
861fdcaa 381 'editingteacher' => CAP_ALLOW,
68c52526 382 'admin' => CAP_ALLOW
383 )
384 ),
eef868d1 385
68c52526 386 'moodle/role:override' => array(
eef868d1 387
bcdb0f19 388 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
389
68c52526 390 'captype' => 'write',
f432bebf 391 'contextlevel' => CONTEXT_COURSE,
68c52526 392 'legacy' => array(
bbbf2d40 393 'admin' => CAP_ALLOW
394 )
395 ),
eef868d1 396
3a0c6cca 397 'moodle/role:safeoverride' => array(
398
399 'riskbitmask' => RISK_SPAM,
400
401 'captype' => 'write',
f432bebf 402 'contextlevel' => CONTEXT_COURSE,
3a0c6cca 403 'legacy' => array(
404 'editingteacher' => CAP_ALLOW
405 )
406 ),
407
bbbf2d40 408 'moodle/role:manage' => array(
eef868d1 409
bcdb0f19 410 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
411
bbbf2d40 412 'captype' => 'write',
413 'contextlevel' => CONTEXT_SYSTEM,
414 'legacy' => array(
bbbf2d40 415 'admin' => CAP_ALLOW
416 )
417 ),
f43ce1ad 418
419 'moodle/role:unassignself' => array(
bcdb0f19 420
f43ce1ad 421 'captype' => 'write',
f432bebf 422 'contextlevel' => CONTEXT_COURSE,
f43ce1ad 423 'legacy' => array(
2d5a4f25 424 'student' => (empty($CFG->allowunenrol)) ? CAP_INHERIT : CAP_ALLOW,
f43ce1ad 425 'teacher' => CAP_ALLOW,
426 'editingteacher' => CAP_ALLOW,
427 'coursecreator' => CAP_ALLOW,
428 'admin' => CAP_ALLOW
429 )
430 ),
99f9cb51 431
432 'moodle/role:viewhiddenassigns' => array(
bcdb0f19 433
99f9cb51 434 'captype' => 'read',
f432bebf 435 'contextlevel' => CONTEXT_COURSE,
99f9cb51 436 'legacy' => array(
99f9cb51 437 'teacher' => CAP_ALLOW,
438 'editingteacher' => CAP_ALLOW,
99f9cb51 439 'admin' => CAP_ALLOW
440 )
441 ),
eef868d1 442
20dd4cf5 443 'moodle/role:switchroles' => array(
bcdb0f19 444
3a0c6cca 445 'riskbitmask' => RISK_XSS | RISK_PERSONAL,
bcdb0f19 446
20dd4cf5 447 'captype' => 'read',
f432bebf 448 'contextlevel' => CONTEXT_COURSE,
20dd4cf5 449 'legacy' => array(
20dd4cf5 450 'editingteacher' => CAP_ALLOW,
20dd4cf5 451 'admin' => CAP_ALLOW
452 )
453 ),
454
bbbf2d40 455 'moodle/category:create' => array(
eef868d1 456
89a792ab 457 'riskbitmask' => RISK_XSS,
458
bbbf2d40 459 'captype' => 'write',
460 'contextlevel' => CONTEXT_COURSECAT,
461 'legacy' => array(
bbbf2d40 462 'admin' => CAP_ALLOW
463 )
464 ),
eef868d1 465
bbbf2d40 466 'moodle/category:delete' => array(
eef868d1 467
3a0c6cca 468 'riskbitmask' => RISK_DATALOSS,
469
bbbf2d40 470 'captype' => 'write',
471 'contextlevel' => CONTEXT_COURSECAT,
472 'legacy' => array(
bbbf2d40 473 'admin' => CAP_ALLOW
474 )
475 ),
eef868d1 476
bbbf2d40 477 'moodle/category:update' => array(
eef868d1 478
89a792ab 479 'riskbitmask' => RISK_XSS,
480
bbbf2d40 481 'captype' => 'write',
482 'contextlevel' => CONTEXT_COURSECAT,
483 'legacy' => array(
bbbf2d40 484 'admin' => CAP_ALLOW
485 )
486 ),
eef868d1 487
bbbf2d40 488 'moodle/category:visibility' => array(
eef868d1 489
bbbf2d40 490 'captype' => 'write',
491 'contextlevel' => CONTEXT_COURSECAT,
492 'legacy' => array(
bbbf2d40 493 'admin' => CAP_ALLOW
494 )
495 ),
eef868d1 496
bbbf2d40 497 'moodle/course:create' => array(
eef868d1 498
21b6db6e 499 'riskbitmask' => RISK_XSS,
500
bbbf2d40 501 'captype' => 'write',
5e992f56 502 'contextlevel' => CONTEXT_COURSECAT,
bbbf2d40 503 'legacy' => array(
4473252d 504 'coursecreator' => CAP_ALLOW,
bbbf2d40 505 'admin' => CAP_ALLOW
506 )
507 ),
eef868d1 508
bbbf2d40 509 'moodle/course:delete' => array(
eef868d1 510
3a0c6cca 511 'riskbitmask' => RISK_DATALOSS,
512
bbbf2d40 513 'captype' => 'write',
514 'contextlevel' => CONTEXT_COURSE,
515 'legacy' => array(
bbbf2d40 516 'admin' => CAP_ALLOW
517 )
518 ),
eef868d1 519
bbbf2d40 520 'moodle/course:update' => array(
eef868d1 521
21b6db6e 522 'riskbitmask' => RISK_XSS,
523
bbbf2d40 524 'captype' => 'write',
525 'contextlevel' => CONTEXT_COURSE,
526 'legacy' => array(
bbbf2d40 527 'editingteacher' => CAP_ALLOW,
bbbf2d40 528 'admin' => CAP_ALLOW
529 )
530 ),
eef868d1 531
bbbf2d40 532 'moodle/course:view' => array(
eef868d1 533
bbbf2d40 534 'captype' => 'read',
535 'contextlevel' => CONTEXT_COURSE,
536 'legacy' => array(
b0f55230 537 'guest' => CAP_ALLOW,
bbbf2d40 538 'student' => CAP_ALLOW,
539 'teacher' => CAP_ALLOW,
72cf2e39 540 'editingteacher' => CAP_ALLOW
bbbf2d40 541 )
542 ),
eef868d1 543
77c645df 544 'moodle/course:bulkmessaging' => array(
545
546 'riskbitmask' => RISK_SPAM,
547
548 'captype' => 'write',
549 'contextlevel' => CONTEXT_COURSE,
550 'legacy' => array(
77c645df 551 'teacher' => CAP_ALLOW,
552 'editingteacher' => CAP_ALLOW,
77c645df 553 'admin' => CAP_ALLOW
554 )
555 ),
556
1c45e42e 557 'moodle/course:viewhiddenuserfields' => array(
eef868d1 558
21b6db6e 559 'riskbitmask' => RISK_PERSONAL,
560
1c45e42e 561 'captype' => 'read',
562 'contextlevel' => CONTEXT_COURSE,
563 'legacy' => array(
1c45e42e 564 'teacher' => CAP_ALLOW,
565 'editingteacher' => CAP_ALLOW,
1c45e42e 566 'admin' => CAP_ALLOW
567 )
568 ),
eef868d1 569
4e781c7b 570 'moodle/course:viewprogress' => array(
571
572 'riskbitmask' => RISK_PERSONAL,
573
574 'captype' => 'read',
575 'contextlevel' => CONTEXT_COURSE,
576 'legacy' => array(
577 'teacher' => CAP_ALLOW,
578 'editingteacher' => CAP_ALLOW,
579 'admin' => CAP_ALLOW
580 )
581 ),
582
1c45e42e 583 'moodle/course:viewhiddencourses' => array(
eef868d1 584
1c45e42e 585 'captype' => 'read',
586 'contextlevel' => CONTEXT_COURSE,
587 'legacy' => array(
2f5ab42b 588 'coursecreator' => CAP_ALLOW,
589 'teacher' => CAP_ALLOW,
590 'editingteacher' => CAP_ALLOW,
a5b8be62 591 'admin' => CAP_ALLOW
1c45e42e 592 )
593 ),
eef868d1 594
bbbf2d40 595 'moodle/course:visibility' => array(
eef868d1 596
bbbf2d40 597 'captype' => 'write',
598 'contextlevel' => CONTEXT_COURSE,
599 'legacy' => array(
bbbf2d40 600 'admin' => CAP_ALLOW
601 )
602 ),
eef868d1 603
a028c291 604 'moodle/course:managefiles' => array(
eef868d1 605
21b6db6e 606 'riskbitmask' => RISK_XSS,
607
a028c291 608 'captype' => 'write',
609 'contextlevel' => CONTEXT_COURSE,
610 'legacy' => array(
a028c291 611 'editingteacher' => CAP_ALLOW,
a028c291 612 'admin' => CAP_ALLOW
613 )
614 ),
eef868d1 615
bbbf2d40 616 'moodle/course:manageactivities' => array(
eef868d1 617
21b6db6e 618 'riskbitmask' => RISK_XSS,
619
bbbf2d40 620 'captype' => 'write',
621 'contextlevel' => CONTEXT_COURSE,
622 'legacy' => array(
bbbf2d40 623 'editingteacher' => CAP_ALLOW,
bbbf2d40 624 'admin' => CAP_ALLOW
625 )
626 ),
eef868d1 627
b79da3ac 628 'moodle/course:managemetacourse' => array(
eef868d1 629
3a0c6cca 630 'riskbitmask' => RISK_XSS | RISK_PERSONAL,
631
4b7aaf40 632 'captype' => 'write',
633 'contextlevel' => CONTEXT_COURSE,
634 'legacy' => array(
4b7aaf40 635 'editingteacher' => CAP_ALLOW,
4b7aaf40 636 'admin' => CAP_ALLOW
637 )
638 ),
eef868d1 639
bbbf2d40 640 'moodle/course:activityvisibility' => array(
eef868d1 641
bbbf2d40 642 'captype' => 'write',
643 'contextlevel' => CONTEXT_COURSE,
644 'legacy' => array(
bbbf2d40 645 'editingteacher' => CAP_ALLOW,
bbbf2d40 646 'admin' => CAP_ALLOW
647 )
648 ),
eef868d1 649
bbbf2d40 650 'moodle/course:viewhiddenactivities' => array(
eef868d1 651
bbbf2d40 652 'captype' => 'write',
653 'contextlevel' => CONTEXT_COURSE,
654 'legacy' => array(
bbbf2d40 655 'teacher' => CAP_ALLOW,
656 'editingteacher' => CAP_ALLOW,
bbbf2d40 657 'admin' => CAP_ALLOW
658 )
659 ),
eef868d1 660
bbbf2d40 661 'moodle/course:viewparticipants' => array(
eef868d1 662
bbbf2d40 663 'captype' => 'read',
664 'contextlevel' => CONTEXT_COURSE,
665 'legacy' => array(
bbbf2d40 666 'student' => CAP_ALLOW,
667 'teacher' => CAP_ALLOW,
668 'editingteacher' => CAP_ALLOW,
bbbf2d40 669 'admin' => CAP_ALLOW
165088f6 670 )
671 ),
672
673 'moodle/site:viewparticipants' => array(
674
675 'captype' => 'read',
676 'contextlevel' => CONTEXT_SYSTEM,
677 'legacy' => array(
678 'admin' => CAP_ALLOW
bbbf2d40 679 )
680 ),
eef868d1 681
bbbf2d40 682 'moodle/course:viewscales' => array(
eef868d1 683
bbbf2d40 684 'captype' => 'read',
685 'contextlevel' => CONTEXT_COURSE,
686 'legacy' => array(
bbbf2d40 687 'student' => CAP_ALLOW,
688 'teacher' => CAP_ALLOW,
689 'editingteacher' => CAP_ALLOW,
bbbf2d40 690 'admin' => CAP_ALLOW
691 )
692 ),
eef868d1 693
bbbf2d40 694 'moodle/course:managescales' => array(
eef868d1 695
bbbf2d40 696 'captype' => 'write',
697 'contextlevel' => CONTEXT_COURSE,
698 'legacy' => array(
bbbf2d40 699 'editingteacher' => CAP_ALLOW,
bbbf2d40 700 'admin' => CAP_ALLOW
701 )
702 ),
eef868d1 703
bbbf2d40 704 'moodle/course:managegroups' => array(
705
706 'captype' => 'write',
707 'contextlevel' => CONTEXT_COURSE,
a028c291 708 'legacy' => array(
a028c291 709 'editingteacher' => CAP_ALLOW,
a028c291 710 'admin' => CAP_ALLOW
711 )
712 ),
eef868d1 713
a028c291 714 'moodle/course:reset' => array(
715
3a0c6cca 716 'riskbitmask' => RISK_DATALOSS,
717
a028c291 718 'captype' => 'write',
719 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 720 'legacy' => array(
bbbf2d40 721 'editingteacher' => CAP_ALLOW,
bbbf2d40 722 'admin' => CAP_ALLOW
723 )
724 ),
eef868d1 725
bbbf2d40 726 'moodle/blog:view' => array(
727
728 'captype' => 'read',
f432bebf 729 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 730 'legacy' => array(
00adf177 731 'guest' => CAP_ALLOW,
c785d40a 732 'user' => CAP_ALLOW,
bbbf2d40 733 'student' => CAP_ALLOW,
734 'teacher' => CAP_ALLOW,
735 'editingteacher' => CAP_ALLOW,
bbbf2d40 736 'admin' => CAP_ALLOW
737 )
738 ),
eef868d1 739
5a8ab2e9 740 'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 741
21b6db6e 742 'riskbitmask' => RISK_SPAM,
743
bbbf2d40 744 'captype' => 'write',
745 'contextlevel' => CONTEXT_SYSTEM,
746 'legacy' => array(
c785d40a 747 'user' => CAP_ALLOW,
bbbf2d40 748 'admin' => CAP_ALLOW
749 )
750 ),
eef868d1 751
bbbf2d40 752 'moodle/blog:manageentries' => array(
753
21b6db6e 754 'riskbitmask' => RISK_SPAM,
755
bbbf2d40 756 'captype' => 'write',
f432bebf 757 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 758 'legacy' => array(
bbbf2d40 759 'teacher' => CAP_ALLOW,
760 'editingteacher' => CAP_ALLOW,
bbbf2d40 761 'admin' => CAP_ALLOW
762 )
763 ),
eef868d1 764
5a8ab2e9 765 'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 766
21b6db6e 767 'riskbitmask' => RISK_SPAM,
768
bbbf2d40 769 'captype' => 'write',
f432bebf 770 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 771 'legacy' => array(
c785d40a 772 'user' => CAP_ALLOW,
bbbf2d40 773 'admin' => CAP_ALLOW
774 )
775 ),
eef868d1 776
f63d2922 777 'moodle/calendar:managegroupentries' => array(
778
779 'riskbitmask' => RISK_SPAM,
780
781 'captype' => 'write',
f432bebf 782 'contextlevel' => CONTEXT_COURSE,
f63d2922 783 'legacy' => array(
784 'teacher' => CAP_ALLOW,
785 'editingteacher' => CAP_ALLOW,
786 'admin' => CAP_ALLOW
787 )
788 ),
789
bbbf2d40 790 'moodle/calendar:manageentries' => array(
791
21b6db6e 792 'riskbitmask' => RISK_SPAM,
793
bbbf2d40 794 'captype' => 'write',
f432bebf 795 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 796 'legacy' => array(
bbbf2d40 797 'teacher' => CAP_ALLOW,
798 'editingteacher' => CAP_ALLOW,
bbbf2d40 799 'admin' => CAP_ALLOW
800 )
77d4953e 801 ),
a044c05d 802
803 'moodle/user:editprofile' => array(
804
3a0c6cca 805 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
a044c05d 806
807 'captype' => 'write',
808 'contextlevel' => CONTEXT_USER,
809 'legacy' => array(
810 'admin' => CAP_ALLOW
811 )
812 ),
eef868d1 813
a5b8be62 814 'moodle/user:editownprofile' => array(
1cb3da36 815
3a0c6cca 816 'riskbitmask' => RISK_SPAM,
817
a5b8be62 818 'captype' => 'write',
819 'contextlevel' => CONTEXT_SYSTEM,
820 'legacy' => array(
1cb3da36 821 'guest' => CAP_PROHIBIT,
822 'user' => CAP_ALLOW,
823 'admin' => CAP_ALLOW
a5b8be62 824 )
1cb3da36 825 ),
826
a5b8be62 827 'moodle/user:changeownpassword' => array(
1cb3da36 828
a5b8be62 829 'captype' => 'write',
830 'contextlevel' => CONTEXT_SYSTEM,
831 'legacy' => array(
1cb3da36 832 'guest' => CAP_PROHIBIT,
833 'user' => CAP_ALLOW,
834 'admin' => CAP_ALLOW
a5b8be62 835 )
1cb3da36 836 ),
837
eef868d1 838 // The next 3 might make no sense for some roles, e.g teacher, etc.
77d4953e 839 // since the next level up is site. These are more for the parent role
840 'moodle/user:readuserposts' => array(
bcdb0f19 841
77d4953e 842 'captype' => 'read',
4b10f08b 843 'contextlevel' => CONTEXT_USER,
77d4953e 844 'legacy' => array(
77d4953e 845 'student' => CAP_ALLOW,
846 'teacher' => CAP_ALLOW,
847 'editingteacher' => CAP_ALLOW,
77d4953e 848 'admin' => CAP_ALLOW
849 )
850 ),
eef868d1 851
77d4953e 852 'moodle/user:readuserblogs' => array(
bcdb0f19 853
77d4953e 854 'captype' => 'read',
4b10f08b 855 'contextlevel' => CONTEXT_USER,
77d4953e 856 'legacy' => array(
77d4953e 857 'student' => CAP_ALLOW,
858 'teacher' => CAP_ALLOW,
859 'editingteacher' => CAP_ALLOW,
77d4953e 860 'admin' => CAP_ALLOW
861 )
862 ),
eef868d1 863
77d4953e 864 'moodle/user:viewuseractivitiesreport' => array(
bcdb0f19 865
77d4953e 866 'captype' => 'read',
4b10f08b 867 'contextlevel' => CONTEXT_USER,
77d4953e 868 'legacy' => array(
77d4953e 869 'teacher' => CAP_ALLOW,
870 'editingteacher' => CAP_ALLOW,
77d4953e 871 'admin' => CAP_ALLOW
872 )
945f88ca 873 ),
4e781c7b 874
3b120e46 875 //capabilities designed for the new message system configuration
876 'moodle/user:editmessageprofile' => array(
877
878 'riskbitmask' => RISK_SPAM,
879
880 'captype' => 'write',
881 'contextlevel' => CONTEXT_USER,
882 'legacy' => array(
883 'admin' => CAP_ALLOW
884 )
885 ),
886
887 'moodle/user:editownmessageprofile' => array(
888
889 'captype' => 'write',
890 'contextlevel' => CONTEXT_SYSTEM,
891 'legacy' => array(
892 'guest' => CAP_PROHIBIT,
893 'user' => CAP_ALLOW,
894 'admin' => CAP_ALLOW
895 )
896 ),
eef868d1 897
271e6dec 898 'moodle/question:managecategory' => array(
14d701d6 899 'riskbitmask' => RISK_SPAM | RISK_XSS,
945f88ca 900 'captype' => 'write',
901 'contextlevel' => CONTEXT_COURSE,
902 'legacy' => array(
945f88ca 903 'editingteacher' => CAP_ALLOW,
945f88ca 904 'admin' => CAP_ALLOW
905 )
a5b8be62 906 ),
907
271e6dec 908 //new in moodle 1.9
909 'moodle/question:add' => array(
14d701d6 910 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 911 'captype' => 'write',
912 'contextlevel' => CONTEXT_COURSE,
913 'legacy' => array(
914 'editingteacher' => CAP_ALLOW,
915 'admin' => CAP_ALLOW
916 ),
917 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 918 ),
271e6dec 919 'moodle/question:editmine' => array(
14d701d6 920 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 921 'captype' => 'write',
922 'contextlevel' => CONTEXT_COURSE,
923 'legacy' => array(
924 'editingteacher' => CAP_ALLOW,
925 'admin' => CAP_ALLOW
926 ),
a5b8be62 927 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 928 ),
929 'moodle/question:editall' => array(
14d701d6 930 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 931 'captype' => 'write',
932 'contextlevel' => CONTEXT_COURSE,
933 'legacy' => array(
934 'editingteacher' => CAP_ALLOW,
935 'admin' => CAP_ALLOW
936 ),
a5b8be62 937 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 938 ),
939 'moodle/question:viewmine' => array(
945f88ca 940 'captype' => 'read',
941 'contextlevel' => CONTEXT_COURSE,
942 'legacy' => array(
945f88ca 943 'editingteacher' => CAP_ALLOW,
945f88ca 944 'admin' => CAP_ALLOW
271e6dec 945 ),
a5b8be62 946 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 947 ),
271e6dec 948 'moodle/question:viewall' => array(
949 'captype' => 'read',
950 'contextlevel' => CONTEXT_COURSE,
951 'legacy' => array(
952 'editingteacher' => CAP_ALLOW,
953 'admin' => CAP_ALLOW
954 ),
a5b8be62 955 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 956 ),
957 'moodle/question:usemine' => array(
958 'captype' => 'read',
959 'contextlevel' => CONTEXT_COURSE,
960 'legacy' => array(
961 'editingteacher' => CAP_ALLOW,
962 'admin' => CAP_ALLOW
963 ),
a5b8be62 964 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 965 ),
966 'moodle/question:useall' => array(
967 'captype' => 'read',
968 'contextlevel' => CONTEXT_COURSE,
969 'legacy' => array(
970 'editingteacher' => CAP_ALLOW,
971 'admin' => CAP_ALLOW
972 ),
a5b8be62 973 'clonepermissionsfrom' => 'moodle/question:manage'
974 ),
271e6dec 975 'moodle/question:movemine' => array(
945f88ca 976 'captype' => 'write',
977 'contextlevel' => CONTEXT_COURSE,
978 'legacy' => array(
945f88ca 979 'editingteacher' => CAP_ALLOW,
945f88ca 980 'admin' => CAP_ALLOW
271e6dec 981 ),
a5b8be62 982 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 983 ),
271e6dec 984 'moodle/question:moveall' => array(
945f88ca 985 'captype' => 'write',
986 'contextlevel' => CONTEXT_COURSE,
987 'legacy' => array(
945f88ca 988 'editingteacher' => CAP_ALLOW,
945f88ca 989 'admin' => CAP_ALLOW
271e6dec 990 ),
a5b8be62 991 'clonepermissionsfrom' => 'moodle/question:manage'
7191a1fa 992 ),
271e6dec 993 //END new in moodle 1.9
a5b8be62 994
0eb6b04a 995 // Configure the installed question types.
996 'moodle/question:config' => array(
0eb6b04a 997 'riskbitmask' => RISK_CONFIG,
0eb6b04a 998 'captype' => 'write',
999 'contextlevel' => CONTEXT_SYSTEM,
1000 'legacy' => array(
1001 'admin' => CAP_ALLOW
1002 )
1003 ),
1004
7191a1fa 1005 'moodle/site:doclinks' => array(
bcdb0f19 1006
7191a1fa 1007 'captype' => 'read',
1008 'contextlevel' => CONTEXT_SYSTEM,
1009 'legacy' => array(
7191a1fa 1010 'teacher' => CAP_ALLOW,
1011 'editingteacher' => CAP_ALLOW,
7191a1fa 1012 'admin' => CAP_ALLOW
1013 )
3924b988 1014 ),
eef868d1 1015
3924b988 1016 'moodle/course:sectionvisibility' => array(
bcdb0f19 1017
3924b988 1018 'captype' => 'write',
1019 'contextlevel' => CONTEXT_COURSE,
1020 'legacy' => array(
3924b988 1021 'editingteacher' => CAP_ALLOW,
3924b988 1022 'admin' => CAP_ALLOW
1023 )
1024 ),
eef868d1 1025
dc558690 1026 'moodle/course:useremail' => array(
bcdb0f19 1027
dc558690 1028 'captype' => 'write',
1029 'contextlevel' => CONTEXT_COURSE,
1030 'legacy' => array(
dc558690 1031 'editingteacher' => CAP_ALLOW,
dc558690 1032 'admin' => CAP_ALLOW
1033 )
1034 ),
eef868d1 1035
3924b988 1036 'moodle/course:viewhiddensections' => array(
bcdb0f19 1037
3924b988 1038 'captype' => 'write',
1039 'contextlevel' => CONTEXT_COURSE,
1040 'legacy' => array(
3924b988 1041 'editingteacher' => CAP_ALLOW,
3924b988 1042 'admin' => CAP_ALLOW
1043 )
1044 ),
eef868d1 1045
3924b988 1046 'moodle/course:setcurrentsection' => array(
bcdb0f19 1047
3924b988 1048 'captype' => 'write',
1049 'contextlevel' => CONTEXT_COURSE,
1050 'legacy' => array(
3924b988 1051 'editingteacher' => CAP_ALLOW,
3924b988 1052 'admin' => CAP_ALLOW
1053 )
1054 ),
eef868d1 1055
dd45888a 1056 'moodle/site:mnetlogintoremote' => array(
1057 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
3924b988 1058 'captype' => 'read',
dd45888a 1059 'contextlevel' => CONTEXT_SYSTEM,
3924b988 1060 'legacy' => array(
3924b988 1061 'admin' => CAP_ALLOW
1062 )
1063 ),
eef868d1 1064
dd45888a 1065 'moodle/grade:viewall' => array(
bcdb0f19 1066 'riskbitmask' => RISK_PERSONAL,
dd45888a 1067 'captype' => 'read',
eecf76df 1068 'contextlevel' => CONTEXT_COURSE, // and CONTEXT_USER
3924b988 1069 'legacy' => array(
dd45888a 1070 'teacher' => CAP_ALLOW,
3924b988 1071 'editingteacher' => CAP_ALLOW,
3924b988 1072 'admin' => CAP_ALLOW
dd45888a 1073 ),
1074 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
f509ce06 1075 ),
f43ce1ad 1076
dd45888a 1077 'moodle/grade:view' => array(
f509ce06 1078 'captype' => 'read',
eecf76df 1079 'contextlevel' => CONTEXT_COURSE,
f509ce06 1080 'legacy' => array(
dd45888a 1081 'student' => CAP_ALLOW
f509ce06 1082 )
ca9ffa18 1083 ),
dd45888a 1084
1085 'moodle/grade:viewhidden' => array(
ca9ffa18 1086 'riskbitmask' => RISK_PERSONAL,
1087 'captype' => 'read',
eecf76df 1088 'contextlevel' => CONTEXT_COURSE,
ca9ffa18 1089 'legacy' => array(
0371f8e5 1090 'teacher' => CAP_ALLOW,
1091 'editingteacher' => CAP_ALLOW,
1092 'admin' => CAP_ALLOW
dd45888a 1093 ),
1094 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
ca9ffa18 1095 ),
dd45888a 1096
1097 'moodle/grade:import' => array(
3a0c6cca 1098 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1099 'captype' => 'write',
ca9ffa18 1100 'contextlevel' => CONTEXT_COURSE,
1101 'legacy' => array(
ca9ffa18 1102 'editingteacher' => CAP_ALLOW,
1103 'admin' => CAP_ALLOW
dd45888a 1104 ),
1105 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1106 ),
dd45888a 1107
1108 'moodle/grade:export' => array(
ca9ffa18 1109 'riskbitmask' => RISK_PERSONAL,
1110 'captype' => 'read',
1111 'contextlevel' => CONTEXT_COURSE,
1112 'legacy' => array(
1113 'teacher' => CAP_ALLOW,
1114 'editingteacher' => CAP_ALLOW,
1115 'admin' => CAP_ALLOW
dd45888a 1116 ),
1117 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1118 ),
dd45888a 1119
1120 'moodle/grade:manage' => array(
3a0c6cca 1121 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1122 'captype' => 'write',
1123 'contextlevel' => CONTEXT_COURSE,
ca9ffa18 1124 'legacy' => array(
dd45888a 1125 'editingteacher' => CAP_ALLOW,
ca9ffa18 1126 'admin' => CAP_ALLOW
dd45888a 1127 ),
1128 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1129 ),
dd45888a 1130
a5b8be62 1131 'moodle/grade:edit' => array(
1132 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
04259694 1133 'captype' => 'write',
1134 'contextlevel' => CONTEXT_COURSE,
1135 'legacy' => array(
1136 'editingteacher' => CAP_ALLOW,
1137 'admin' => CAP_ALLOW
1138 ),
1139 'clonepermissionsfrom' => 'moodle/course:managegrades'
1140 ),
1141
a5b8be62 1142 'moodle/grade:manageoutcomes' => array(
284abb09 1143 'captype' => 'write',
1144 'contextlevel' => CONTEXT_COURSE,
1145 'legacy' => array(
1146 'editingteacher' => CAP_ALLOW,
1147 'admin' => CAP_ALLOW
1148 ),
1149 'clonepermissionsfrom' => 'moodle/course:managegrades'
1150 ),
1151
1152 'moodle/grade:manageletters' => array(
ca9ffa18 1153 'captype' => 'write',
1154 'contextlevel' => CONTEXT_COURSE,
1155 'legacy' => array(
1156 'editingteacher' => CAP_ALLOW,
1157 'admin' => CAP_ALLOW
a5b8be62 1158 ),
1159 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1160 ),
dd45888a 1161
a5b8be62 1162 'moodle/grade:hide' => array(
ca9ffa18 1163 'captype' => 'write',
1164 'contextlevel' => CONTEXT_COURSE,
1165 'legacy' => array(
1166 'editingteacher' => CAP_ALLOW,
1167 'admin' => CAP_ALLOW
1168 )
1169 ),
dd45888a 1170
a5b8be62 1171 'moodle/grade:lock' => array(
dd45888a 1172 'captype' => 'write',
ca9ffa18 1173 'contextlevel' => CONTEXT_COURSE,
1174 'legacy' => array(
1175 'editingteacher' => CAP_ALLOW,
1176 'admin' => CAP_ALLOW
1177 )
1178 ),
dd45888a 1179
a5b8be62 1180 'moodle/grade:unlock' => array(
ca9ffa18 1181 'captype' => 'write',
1182 'contextlevel' => CONTEXT_COURSE,
1183 'legacy' => array(
1184 'editingteacher' => CAP_ALLOW,
1185 'admin' => CAP_ALLOW
1186 )
282c1695 1187 ),
dd45888a 1188
1189 'moodle/my:manageblocks' => array(
282c1695 1190 'captype' => 'write',
1191 'contextlevel' => CONTEXT_SYSTEM,
1192 'legacy' => array(
1193 'user' => CAP_ALLOW
1194 )
eca3af25 1195 ),
dd45888a 1196
eca3af25 1197 'moodle/notes:view' => array(
1198 'captype' => 'read',
f432bebf 1199 'contextlevel' => CONTEXT_COURSE,
eca3af25 1200 'legacy' => array(
1201 'teacher' => CAP_ALLOW,
1202 'editingteacher' => CAP_ALLOW,
1203 'admin' => CAP_ALLOW
1204 )
1205 ),
1206
1207 'moodle/notes:manage' => array(
3a0c6cca 1208 'riskbitmask' => RISK_SPAM,
1209
eca3af25 1210 'captype' => 'write',
f432bebf 1211 'contextlevel' => CONTEXT_COURSE,
eca3af25 1212 'legacy' => array(
1213 'teacher' => CAP_ALLOW,
1214 'editingteacher' => CAP_ALLOW,
1215 'admin' => CAP_ALLOW
1216 )
dd45888a 1217 ),
79642064 1218
1219 'moodle/tag:manage' => array(
3a0c6cca 1220 'riskbitmask' => RISK_SPAM,
1221
79642064 1222 'captype' => 'write',
1223 'contextlevel' => CONTEXT_SYSTEM,
1224 'legacy' => array(
1225 'teacher' => CAP_ALLOW,
1226 'editingteacher' => CAP_ALLOW,
1227 'admin' => CAP_ALLOW
1228 )
705789bd 1229 ),
1230
1231 'moodle/tag:create' => array(
3a0c6cca 1232 'riskbitmask' => RISK_SPAM,
1233
705789bd 1234 'captype' => 'write',
1235 'contextlevel' => CONTEXT_SYSTEM,
1236 'legacy' => array(
0f07c40e 1237 'admin' => CAP_ALLOW,
1238 'user' => CAP_ALLOW
705789bd 1239 )
1240 ),
a5b8be62 1241
705789bd 1242 'moodle/tag:edit' => array(
3a0c6cca 1243 'riskbitmask' => RISK_SPAM,
1244
705789bd 1245 'captype' => 'write',
1246 'contextlevel' => CONTEXT_SYSTEM,
1247 'legacy' => array(
3e6e529f 1248 'admin' => CAP_ALLOW,
1249 'user' => CAP_ALLOW
98b5789d 1250 )
1251 ),
a5b8be62 1252
98b5789d 1253 'moodle/tag:editblocks' => array(
1254 'captype' => 'write',
1255 'contextlevel' => CONTEXT_SYSTEM,
1256 'legacy' => array(
705789bd 1257 'teacher' => CAP_ALLOW,
1258 'editingteacher' => CAP_ALLOW,
1259 'admin' => CAP_ALLOW
1260 )
7e874772 1261 ),
1262
1263 'moodle/block:view' => array(
1264 'captype' => 'read',
1265 'contextlevel' => CONTEXT_BLOCK,
1266 'legacy' => array(
1267 'guest' => CAP_ALLOW,
25a7d980 1268 'user' => CAP_ALLOW,
1269 'student' => CAP_ALLOW,
1270 'teacher' => CAP_ALLOW,
1271 'editingteacher' => CAP_ALLOW,
1272 'coursecreator' => CAP_ALLOW
7e874772 1273 )
8512f577 1274 ),
1275
1276 'moodle/portfolio:export' => array(
1277 'captype' => 'read',
1278 'contextlevel' => CONTEXT_SYSTEM,
1279 'legacy' => array(
1280 'user' => CAP_ALLOW,
1281 'student' => CAP_ALLOW,
1282 'teacher' => CAP_ALLOW,
1283 'editingteacher' => CAP_ALLOW,
1284 'coursecreator' => CAP_ALLOW
1285 )
79642064 1286 )
bbbf2d40 1287);
1288
98b5789d 1289
bbbf2d40 1290?>