"MDL-17448, fix assignment due time, merged from 1.9"
[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 ),
f7c0d84b 123
576ad290 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 )
f7c0d84b 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,
4e781c7b 560
561 'captype' => 'read',
562 'contextlevel' => CONTEXT_COURSE,
563 'legacy' => array(
564 'teacher' => CAP_ALLOW,
565 'editingteacher' => CAP_ALLOW,
566 'admin' => CAP_ALLOW
567 )
568 ),
569
1c45e42e 570 'moodle/course:viewhiddencourses' => array(
eef868d1 571
1c45e42e 572 'captype' => 'read',
573 'contextlevel' => CONTEXT_COURSE,
574 'legacy' => array(
2f5ab42b 575 'coursecreator' => CAP_ALLOW,
576 'teacher' => CAP_ALLOW,
577 'editingteacher' => CAP_ALLOW,
a5b8be62 578 'admin' => CAP_ALLOW
1c45e42e 579 )
580 ),
eef868d1 581
bbbf2d40 582 'moodle/course:visibility' => array(
eef868d1 583
bbbf2d40 584 'captype' => 'write',
585 'contextlevel' => CONTEXT_COURSE,
586 'legacy' => array(
bbbf2d40 587 'admin' => CAP_ALLOW
588 )
589 ),
eef868d1 590
a028c291 591 'moodle/course:managefiles' => array(
eef868d1 592
21b6db6e 593 'riskbitmask' => RISK_XSS,
594
a028c291 595 'captype' => 'write',
596 'contextlevel' => CONTEXT_COURSE,
597 'legacy' => array(
a028c291 598 'editingteacher' => CAP_ALLOW,
a028c291 599 'admin' => CAP_ALLOW
600 )
601 ),
eef868d1 602
bbbf2d40 603 'moodle/course:manageactivities' => array(
eef868d1 604
21b6db6e 605 'riskbitmask' => RISK_XSS,
606
bbbf2d40 607 'captype' => 'write',
608 'contextlevel' => CONTEXT_COURSE,
609 'legacy' => array(
bbbf2d40 610 'editingteacher' => CAP_ALLOW,
bbbf2d40 611 'admin' => CAP_ALLOW
612 )
613 ),
eef868d1 614
b79da3ac 615 'moodle/course:managemetacourse' => array(
eef868d1 616
3a0c6cca 617 'riskbitmask' => RISK_XSS | RISK_PERSONAL,
618
4b7aaf40 619 'captype' => 'write',
620 'contextlevel' => CONTEXT_COURSE,
621 'legacy' => array(
4b7aaf40 622 'editingteacher' => CAP_ALLOW,
4b7aaf40 623 'admin' => CAP_ALLOW
624 )
625 ),
eef868d1 626
bbbf2d40 627 'moodle/course:activityvisibility' => array(
eef868d1 628
bbbf2d40 629 'captype' => 'write',
630 'contextlevel' => CONTEXT_COURSE,
631 'legacy' => array(
bbbf2d40 632 'editingteacher' => CAP_ALLOW,
bbbf2d40 633 'admin' => CAP_ALLOW
634 )
635 ),
eef868d1 636
bbbf2d40 637 'moodle/course:viewhiddenactivities' => array(
eef868d1 638
bbbf2d40 639 'captype' => 'write',
640 'contextlevel' => CONTEXT_COURSE,
641 'legacy' => array(
bbbf2d40 642 'teacher' => CAP_ALLOW,
643 'editingteacher' => CAP_ALLOW,
bbbf2d40 644 'admin' => CAP_ALLOW
645 )
646 ),
eef868d1 647
bbbf2d40 648 'moodle/course:viewparticipants' => array(
eef868d1 649
bbbf2d40 650 'captype' => 'read',
651 'contextlevel' => CONTEXT_COURSE,
652 'legacy' => array(
bbbf2d40 653 'student' => CAP_ALLOW,
654 'teacher' => CAP_ALLOW,
655 'editingteacher' => CAP_ALLOW,
bbbf2d40 656 'admin' => CAP_ALLOW
165088f6 657 )
658 ),
f7c0d84b 659
660 'moodle/course:changefullname' => array(
661
cd7f72c0 662 'riskbitmask' => RISK_XSS,
663
f7c0d84b 664 'captype' => 'write',
665 'contextlevel' => CONTEXT_COURSE,
666 'legacy' => array(
667 'editingteacher' => CAP_ALLOW,
668 'admin' => CAP_ALLOW
5e99b9d7 669 ),
670 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 671 ),
672
673 'moodle/course:changeshortname' => array(
674
cd7f72c0 675 'riskbitmask' => RISK_XSS,
676
f7c0d84b 677 'captype' => 'write',
678 'contextlevel' => CONTEXT_COURSE,
679 'legacy' => array(
680 'editingteacher' => CAP_ALLOW,
681 'admin' => CAP_ALLOW
5e99b9d7 682 ),
683 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 684 ),
685
686 'moodle/course:changeidnumber' => array(
687
cd7f72c0 688 'riskbitmask' => RISK_XSS,
689
f7c0d84b 690 'captype' => 'write',
691 'contextlevel' => CONTEXT_COURSE,
692 'legacy' => array(
693 'editingteacher' => CAP_ALLOW,
694 'admin' => CAP_ALLOW
5e99b9d7 695 ),
696 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 697 ),
698
165088f6 699 'moodle/site:viewparticipants' => array(
700
701 'captype' => 'read',
702 'contextlevel' => CONTEXT_SYSTEM,
703 'legacy' => array(
704 'admin' => CAP_ALLOW
bbbf2d40 705 )
706 ),
eef868d1 707
bbbf2d40 708 'moodle/course:viewscales' => array(
eef868d1 709
bbbf2d40 710 'captype' => 'read',
711 'contextlevel' => CONTEXT_COURSE,
712 'legacy' => array(
bbbf2d40 713 'student' => CAP_ALLOW,
714 'teacher' => CAP_ALLOW,
715 'editingteacher' => CAP_ALLOW,
bbbf2d40 716 'admin' => CAP_ALLOW
717 )
718 ),
eef868d1 719
bbbf2d40 720 'moodle/course:managescales' => array(
eef868d1 721
bbbf2d40 722 'captype' => 'write',
723 'contextlevel' => CONTEXT_COURSE,
724 'legacy' => array(
bbbf2d40 725 'editingteacher' => CAP_ALLOW,
bbbf2d40 726 'admin' => CAP_ALLOW
727 )
728 ),
eef868d1 729
bbbf2d40 730 'moodle/course:managegroups' => array(
731
732 'captype' => 'write',
733 'contextlevel' => CONTEXT_COURSE,
a028c291 734 'legacy' => array(
a028c291 735 'editingteacher' => CAP_ALLOW,
a028c291 736 'admin' => CAP_ALLOW
737 )
738 ),
eef868d1 739
a028c291 740 'moodle/course:reset' => array(
741
3a0c6cca 742 'riskbitmask' => RISK_DATALOSS,
743
a028c291 744 'captype' => 'write',
745 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 746 'legacy' => array(
bbbf2d40 747 'editingteacher' => CAP_ALLOW,
bbbf2d40 748 'admin' => CAP_ALLOW
749 )
750 ),
eef868d1 751
bbbf2d40 752 'moodle/blog:view' => array(
753
754 'captype' => 'read',
f432bebf 755 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 756 'legacy' => array(
00adf177 757 'guest' => CAP_ALLOW,
c785d40a 758 'user' => CAP_ALLOW,
bbbf2d40 759 'student' => CAP_ALLOW,
760 'teacher' => CAP_ALLOW,
761 'editingteacher' => CAP_ALLOW,
bbbf2d40 762 'admin' => CAP_ALLOW
763 )
764 ),
eef868d1 765
5a8ab2e9 766 'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 767
21b6db6e 768 'riskbitmask' => RISK_SPAM,
769
bbbf2d40 770 'captype' => 'write',
771 'contextlevel' => CONTEXT_SYSTEM,
772 'legacy' => array(
c785d40a 773 'user' => CAP_ALLOW,
bbbf2d40 774 'admin' => CAP_ALLOW
775 )
776 ),
eef868d1 777
bbbf2d40 778 'moodle/blog:manageentries' => array(
779
21b6db6e 780 'riskbitmask' => RISK_SPAM,
781
bbbf2d40 782 'captype' => 'write',
f432bebf 783 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 784 'legacy' => array(
bbbf2d40 785 'teacher' => CAP_ALLOW,
786 'editingteacher' => CAP_ALLOW,
bbbf2d40 787 'admin' => CAP_ALLOW
788 )
789 ),
eef868d1 790
5a8ab2e9 791 'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 792
21b6db6e 793 'riskbitmask' => RISK_SPAM,
794
bbbf2d40 795 'captype' => 'write',
f432bebf 796 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 797 'legacy' => array(
c785d40a 798 'user' => CAP_ALLOW,
bbbf2d40 799 'admin' => CAP_ALLOW
800 )
801 ),
eef868d1 802
f63d2922 803 'moodle/calendar:managegroupentries' => array(
804
805 'riskbitmask' => RISK_SPAM,
806
807 'captype' => 'write',
f432bebf 808 'contextlevel' => CONTEXT_COURSE,
f63d2922 809 'legacy' => array(
810 'teacher' => CAP_ALLOW,
811 'editingteacher' => CAP_ALLOW,
812 'admin' => CAP_ALLOW
813 )
814 ),
815
bbbf2d40 816 'moodle/calendar:manageentries' => array(
817
21b6db6e 818 'riskbitmask' => RISK_SPAM,
819
bbbf2d40 820 'captype' => 'write',
f432bebf 821 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 822 'legacy' => array(
bbbf2d40 823 'teacher' => CAP_ALLOW,
824 'editingteacher' => CAP_ALLOW,
bbbf2d40 825 'admin' => CAP_ALLOW
826 )
77d4953e 827 ),
a044c05d 828
829 'moodle/user:editprofile' => array(
830
3a0c6cca 831 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
a044c05d 832
833 'captype' => 'write',
834 'contextlevel' => CONTEXT_USER,
835 'legacy' => array(
836 'admin' => CAP_ALLOW
837 )
838 ),
eef868d1 839
a5b8be62 840 'moodle/user:editownprofile' => array(
1cb3da36 841
3a0c6cca 842 'riskbitmask' => RISK_SPAM,
843
a5b8be62 844 'captype' => 'write',
845 'contextlevel' => CONTEXT_SYSTEM,
846 'legacy' => array(
1cb3da36 847 'guest' => CAP_PROHIBIT,
848 'user' => CAP_ALLOW,
849 'admin' => CAP_ALLOW
a5b8be62 850 )
1cb3da36 851 ),
852
a5b8be62 853 'moodle/user:changeownpassword' => array(
1cb3da36 854
a5b8be62 855 'captype' => 'write',
856 'contextlevel' => CONTEXT_SYSTEM,
857 'legacy' => array(
1cb3da36 858 'guest' => CAP_PROHIBIT,
859 'user' => CAP_ALLOW,
860 'admin' => CAP_ALLOW
a5b8be62 861 )
1cb3da36 862 ),
863
eef868d1 864 // The next 3 might make no sense for some roles, e.g teacher, etc.
77d4953e 865 // since the next level up is site. These are more for the parent role
866 'moodle/user:readuserposts' => array(
bcdb0f19 867
77d4953e 868 'captype' => 'read',
4b10f08b 869 'contextlevel' => CONTEXT_USER,
77d4953e 870 'legacy' => array(
77d4953e 871 'student' => CAP_ALLOW,
872 'teacher' => CAP_ALLOW,
873 'editingteacher' => CAP_ALLOW,
77d4953e 874 'admin' => CAP_ALLOW
875 )
876 ),
eef868d1 877
77d4953e 878 'moodle/user:readuserblogs' => array(
bcdb0f19 879
77d4953e 880 'captype' => 'read',
4b10f08b 881 'contextlevel' => CONTEXT_USER,
77d4953e 882 'legacy' => array(
77d4953e 883 'student' => CAP_ALLOW,
884 'teacher' => CAP_ALLOW,
885 'editingteacher' => CAP_ALLOW,
77d4953e 886 'admin' => CAP_ALLOW
887 )
888 ),
eef868d1 889
3c7da16d 890 // designed for parent role - not used in legacy roles
77d4953e 891 'moodle/user:viewuseractivitiesreport' => array(
3c7da16d 892 'riskbitmask' => RISK_PERSONAL,
bcdb0f19 893
77d4953e 894 'captype' => 'read',
4b10f08b 895 'contextlevel' => CONTEXT_USER,
77d4953e 896 'legacy' => array(
77d4953e 897 )
945f88ca 898 ),
4e781c7b 899
3b120e46 900 //capabilities designed for the new message system configuration
901 'moodle/user:editmessageprofile' => array(
f7c0d84b 902
3b120e46 903 'riskbitmask' => RISK_SPAM,
f7c0d84b 904
3b120e46 905 'captype' => 'write',
906 'contextlevel' => CONTEXT_USER,
907 'legacy' => array(
908 'admin' => CAP_ALLOW
909 )
910 ),
f7c0d84b 911
912 'moodle/user:editownmessageprofile' => array(
913
914 'captype' => 'write',
915 'contextlevel' => CONTEXT_SYSTEM,
916 'legacy' => array(
3b120e46 917 'guest' => CAP_PROHIBIT,
918 'user' => CAP_ALLOW,
919 'admin' => CAP_ALLOW
f7c0d84b 920 )
3b120e46 921 ),
eef868d1 922
271e6dec 923 'moodle/question:managecategory' => array(
14d701d6 924 'riskbitmask' => RISK_SPAM | RISK_XSS,
945f88ca 925 'captype' => 'write',
926 'contextlevel' => CONTEXT_COURSE,
927 'legacy' => array(
945f88ca 928 'editingteacher' => CAP_ALLOW,
945f88ca 929 'admin' => CAP_ALLOW
930 )
a5b8be62 931 ),
932
271e6dec 933 //new in moodle 1.9
934 'moodle/question:add' => array(
14d701d6 935 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 936 'captype' => 'write',
937 'contextlevel' => CONTEXT_COURSE,
938 'legacy' => array(
939 'editingteacher' => CAP_ALLOW,
940 'admin' => CAP_ALLOW
941 ),
942 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 943 ),
271e6dec 944 'moodle/question:editmine' => array(
14d701d6 945 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 946 'captype' => 'write',
947 'contextlevel' => CONTEXT_COURSE,
948 'legacy' => array(
949 'editingteacher' => CAP_ALLOW,
950 'admin' => CAP_ALLOW
951 ),
a5b8be62 952 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 953 ),
954 'moodle/question:editall' => array(
14d701d6 955 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 956 'captype' => 'write',
957 'contextlevel' => CONTEXT_COURSE,
958 'legacy' => array(
959 'editingteacher' => CAP_ALLOW,
960 'admin' => CAP_ALLOW
961 ),
a5b8be62 962 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 963 ),
964 'moodle/question:viewmine' => array(
945f88ca 965 'captype' => 'read',
966 'contextlevel' => CONTEXT_COURSE,
967 'legacy' => array(
945f88ca 968 'editingteacher' => CAP_ALLOW,
945f88ca 969 'admin' => CAP_ALLOW
271e6dec 970 ),
a5b8be62 971 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 972 ),
271e6dec 973 'moodle/question:viewall' => array(
974 'captype' => 'read',
975 'contextlevel' => CONTEXT_COURSE,
976 'legacy' => array(
977 'editingteacher' => CAP_ALLOW,
978 'admin' => CAP_ALLOW
979 ),
a5b8be62 980 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 981 ),
982 'moodle/question:usemine' => array(
983 'captype' => 'read',
984 'contextlevel' => CONTEXT_COURSE,
985 'legacy' => array(
986 'editingteacher' => CAP_ALLOW,
987 'admin' => CAP_ALLOW
988 ),
a5b8be62 989 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 990 ),
991 'moodle/question:useall' => array(
992 'captype' => 'read',
993 'contextlevel' => CONTEXT_COURSE,
994 'legacy' => array(
995 'editingteacher' => CAP_ALLOW,
996 'admin' => CAP_ALLOW
997 ),
a5b8be62 998 'clonepermissionsfrom' => 'moodle/question:manage'
999 ),
271e6dec 1000 'moodle/question:movemine' => array(
945f88ca 1001 'captype' => 'write',
1002 'contextlevel' => CONTEXT_COURSE,
1003 'legacy' => array(
945f88ca 1004 'editingteacher' => CAP_ALLOW,
945f88ca 1005 'admin' => CAP_ALLOW
271e6dec 1006 ),
a5b8be62 1007 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1008 ),
271e6dec 1009 'moodle/question:moveall' => array(
945f88ca 1010 'captype' => 'write',
1011 'contextlevel' => CONTEXT_COURSE,
1012 'legacy' => array(
945f88ca 1013 'editingteacher' => CAP_ALLOW,
945f88ca 1014 'admin' => CAP_ALLOW
271e6dec 1015 ),
a5b8be62 1016 'clonepermissionsfrom' => 'moodle/question:manage'
7191a1fa 1017 ),
271e6dec 1018 //END new in moodle 1.9
a5b8be62 1019
0eb6b04a 1020 // Configure the installed question types.
1021 'moodle/question:config' => array(
0eb6b04a 1022 'riskbitmask' => RISK_CONFIG,
0eb6b04a 1023 'captype' => 'write',
1024 'contextlevel' => CONTEXT_SYSTEM,
1025 'legacy' => array(
1026 'admin' => CAP_ALLOW
1027 )
1028 ),
1029
62e76c67 1030 // While attempting questions, the ability to flag particular questions for later reference.
1031 'moodle/question:flag' => array(
1032 'captype' => 'write',
1033 'contextlevel' => CONTEXT_COURSE,
1034 'legacy' => array(
1035 'student' => CAP_ALLOW,
1036 'teacher' => CAP_ALLOW,
1037 'editingteacher' => CAP_ALLOW,
1038 'coursecreator' => CAP_ALLOW,
1039 'admin' => CAP_ALLOW
1040 )
1041 ),
bcdb0f19 1042
62e76c67 1043 'moodle/site:doclinks' => array(
7191a1fa 1044 'captype' => 'read',
1045 'contextlevel' => CONTEXT_SYSTEM,
1046 'legacy' => array(
7191a1fa 1047 'teacher' => CAP_ALLOW,
1048 'editingteacher' => CAP_ALLOW,
7191a1fa 1049 'admin' => CAP_ALLOW
1050 )
3924b988 1051 ),
eef868d1 1052
3924b988 1053 'moodle/course:sectionvisibility' => array(
bcdb0f19 1054
3924b988 1055 'captype' => 'write',
1056 'contextlevel' => CONTEXT_COURSE,
1057 'legacy' => array(
3924b988 1058 'editingteacher' => CAP_ALLOW,
3924b988 1059 'admin' => CAP_ALLOW
1060 )
1061 ),
eef868d1 1062
dc558690 1063 'moodle/course:useremail' => array(
bcdb0f19 1064
dc558690 1065 'captype' => 'write',
1066 'contextlevel' => CONTEXT_COURSE,
1067 'legacy' => array(
dc558690 1068 'editingteacher' => CAP_ALLOW,
dc558690 1069 'admin' => CAP_ALLOW
1070 )
1071 ),
eef868d1 1072
3924b988 1073 'moodle/course:viewhiddensections' => array(
bcdb0f19 1074
3924b988 1075 'captype' => 'write',
1076 'contextlevel' => CONTEXT_COURSE,
1077 'legacy' => array(
3924b988 1078 'editingteacher' => CAP_ALLOW,
3924b988 1079 'admin' => CAP_ALLOW
1080 )
1081 ),
eef868d1 1082
3924b988 1083 'moodle/course:setcurrentsection' => array(
bcdb0f19 1084
3924b988 1085 'captype' => 'write',
1086 'contextlevel' => CONTEXT_COURSE,
1087 'legacy' => array(
3924b988 1088 'editingteacher' => CAP_ALLOW,
3924b988 1089 'admin' => CAP_ALLOW
1090 )
1091 ),
eef868d1 1092
dd45888a 1093 'moodle/site:mnetlogintoremote' => array(
1094 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
3924b988 1095 'captype' => 'read',
dd45888a 1096 'contextlevel' => CONTEXT_SYSTEM,
3924b988 1097 'legacy' => array(
3924b988 1098 'admin' => CAP_ALLOW
1099 )
1100 ),
eef868d1 1101
dd45888a 1102 'moodle/grade:viewall' => array(
bcdb0f19 1103 'riskbitmask' => RISK_PERSONAL,
dd45888a 1104 'captype' => 'read',
eecf76df 1105 'contextlevel' => CONTEXT_COURSE, // and CONTEXT_USER
3924b988 1106 'legacy' => array(
dd45888a 1107 'teacher' => CAP_ALLOW,
3924b988 1108 'editingteacher' => CAP_ALLOW,
3924b988 1109 'admin' => CAP_ALLOW
dd45888a 1110 ),
1111 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
f509ce06 1112 ),
f43ce1ad 1113
dd45888a 1114 'moodle/grade:view' => array(
f509ce06 1115 'captype' => 'read',
eecf76df 1116 'contextlevel' => CONTEXT_COURSE,
f509ce06 1117 'legacy' => array(
dd45888a 1118 'student' => CAP_ALLOW
f509ce06 1119 )
ca9ffa18 1120 ),
dd45888a 1121
1122 'moodle/grade:viewhidden' => array(
ca9ffa18 1123 'riskbitmask' => RISK_PERSONAL,
1124 'captype' => 'read',
eecf76df 1125 'contextlevel' => CONTEXT_COURSE,
ca9ffa18 1126 'legacy' => array(
0371f8e5 1127 'teacher' => CAP_ALLOW,
1128 'editingteacher' => CAP_ALLOW,
1129 'admin' => CAP_ALLOW
dd45888a 1130 ),
1131 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
ca9ffa18 1132 ),
dd45888a 1133
1134 'moodle/grade:import' => array(
3a0c6cca 1135 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1136 'captype' => 'write',
ca9ffa18 1137 'contextlevel' => CONTEXT_COURSE,
1138 'legacy' => array(
ca9ffa18 1139 'editingteacher' => CAP_ALLOW,
1140 'admin' => CAP_ALLOW
dd45888a 1141 ),
1142 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1143 ),
dd45888a 1144
1145 'moodle/grade:export' => array(
ca9ffa18 1146 'riskbitmask' => RISK_PERSONAL,
1147 'captype' => 'read',
1148 'contextlevel' => CONTEXT_COURSE,
1149 'legacy' => array(
1150 'teacher' => CAP_ALLOW,
1151 'editingteacher' => CAP_ALLOW,
1152 'admin' => CAP_ALLOW
dd45888a 1153 ),
1154 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1155 ),
dd45888a 1156
1157 'moodle/grade:manage' => array(
3a0c6cca 1158 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1159 'captype' => 'write',
1160 'contextlevel' => CONTEXT_COURSE,
ca9ffa18 1161 'legacy' => array(
dd45888a 1162 'editingteacher' => CAP_ALLOW,
ca9ffa18 1163 'admin' => CAP_ALLOW
dd45888a 1164 ),
1165 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1166 ),
dd45888a 1167
a5b8be62 1168 'moodle/grade:edit' => array(
1169 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
04259694 1170 'captype' => 'write',
1171 'contextlevel' => CONTEXT_COURSE,
1172 'legacy' => array(
1173 'editingteacher' => CAP_ALLOW,
1174 'admin' => CAP_ALLOW
1175 ),
1176 'clonepermissionsfrom' => 'moodle/course:managegrades'
1177 ),
1178
a5b8be62 1179 'moodle/grade:manageoutcomes' => array(
284abb09 1180 'captype' => 'write',
1181 'contextlevel' => CONTEXT_COURSE,
1182 'legacy' => array(
1183 'editingteacher' => CAP_ALLOW,
1184 'admin' => CAP_ALLOW
1185 ),
1186 'clonepermissionsfrom' => 'moodle/course:managegrades'
1187 ),
1188
1189 'moodle/grade:manageletters' => array(
ca9ffa18 1190 'captype' => 'write',
1191 'contextlevel' => CONTEXT_COURSE,
1192 'legacy' => array(
1193 'editingteacher' => CAP_ALLOW,
1194 'admin' => CAP_ALLOW
a5b8be62 1195 ),
1196 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1197 ),
dd45888a 1198
a5b8be62 1199 'moodle/grade:hide' => array(
ca9ffa18 1200 'captype' => 'write',
1201 'contextlevel' => CONTEXT_COURSE,
1202 'legacy' => array(
1203 'editingteacher' => CAP_ALLOW,
1204 'admin' => CAP_ALLOW
1205 )
1206 ),
dd45888a 1207
a5b8be62 1208 'moodle/grade:lock' => array(
dd45888a 1209 'captype' => 'write',
ca9ffa18 1210 'contextlevel' => CONTEXT_COURSE,
1211 'legacy' => array(
1212 'editingteacher' => CAP_ALLOW,
1213 'admin' => CAP_ALLOW
1214 )
1215 ),
dd45888a 1216
a5b8be62 1217 'moodle/grade:unlock' => array(
ca9ffa18 1218 'captype' => 'write',
1219 'contextlevel' => CONTEXT_COURSE,
1220 'legacy' => array(
1221 'editingteacher' => CAP_ALLOW,
1222 'admin' => CAP_ALLOW
1223 )
282c1695 1224 ),
dd45888a 1225
1226 'moodle/my:manageblocks' => array(
282c1695 1227 'captype' => 'write',
1228 'contextlevel' => CONTEXT_SYSTEM,
1229 'legacy' => array(
1230 'user' => CAP_ALLOW
1231 )
eca3af25 1232 ),
dd45888a 1233
eca3af25 1234 'moodle/notes:view' => array(
1235 'captype' => 'read',
f432bebf 1236 'contextlevel' => CONTEXT_COURSE,
eca3af25 1237 'legacy' => array(
1238 'teacher' => CAP_ALLOW,
1239 'editingteacher' => CAP_ALLOW,
1240 'admin' => CAP_ALLOW
1241 )
1242 ),
1243
1244 'moodle/notes:manage' => array(
3a0c6cca 1245 'riskbitmask' => RISK_SPAM,
1246
eca3af25 1247 'captype' => 'write',
f432bebf 1248 'contextlevel' => CONTEXT_COURSE,
eca3af25 1249 'legacy' => array(
1250 'teacher' => CAP_ALLOW,
1251 'editingteacher' => CAP_ALLOW,
1252 'admin' => CAP_ALLOW
1253 )
dd45888a 1254 ),
79642064 1255
1256 'moodle/tag:manage' => array(
3a0c6cca 1257 'riskbitmask' => RISK_SPAM,
1258
79642064 1259 'captype' => 'write',
1260 'contextlevel' => CONTEXT_SYSTEM,
1261 'legacy' => array(
1262 'teacher' => CAP_ALLOW,
1263 'editingteacher' => CAP_ALLOW,
1264 'admin' => CAP_ALLOW
1265 )
705789bd 1266 ),
1267
1268 'moodle/tag:create' => array(
3a0c6cca 1269 'riskbitmask' => RISK_SPAM,
1270
705789bd 1271 'captype' => 'write',
1272 'contextlevel' => CONTEXT_SYSTEM,
1273 'legacy' => array(
0f07c40e 1274 'admin' => CAP_ALLOW,
1275 'user' => CAP_ALLOW
705789bd 1276 )
1277 ),
a5b8be62 1278
705789bd 1279 'moodle/tag:edit' => array(
3a0c6cca 1280 'riskbitmask' => RISK_SPAM,
1281
705789bd 1282 'captype' => 'write',
1283 'contextlevel' => CONTEXT_SYSTEM,
1284 'legacy' => array(
3e6e529f 1285 'admin' => CAP_ALLOW,
1286 'user' => CAP_ALLOW
98b5789d 1287 )
1288 ),
a5b8be62 1289
98b5789d 1290 'moodle/tag:editblocks' => array(
1291 'captype' => 'write',
1292 'contextlevel' => CONTEXT_SYSTEM,
1293 'legacy' => array(
705789bd 1294 'teacher' => CAP_ALLOW,
1295 'editingteacher' => CAP_ALLOW,
1296 'admin' => CAP_ALLOW
1297 )
7e874772 1298 ),
1299
1300 'moodle/block:view' => array(
1301 'captype' => 'read',
1302 'contextlevel' => CONTEXT_BLOCK,
1303 'legacy' => array(
1304 'guest' => CAP_ALLOW,
25a7d980 1305 'user' => CAP_ALLOW,
1306 'student' => CAP_ALLOW,
1307 'teacher' => CAP_ALLOW,
1308 'editingteacher' => CAP_ALLOW,
1309 'coursecreator' => CAP_ALLOW
7e874772 1310 )
8512f577 1311 ),
1312
1313 'moodle/portfolio:export' => array(
1314 'captype' => 'read',
1315 'contextlevel' => CONTEXT_SYSTEM,
1316 'legacy' => array(
1317 'user' => CAP_ALLOW,
1318 'student' => CAP_ALLOW,
1319 'teacher' => CAP_ALLOW,
1320 'editingteacher' => CAP_ALLOW,
1321 'coursecreator' => CAP_ALLOW
1322 )
79642064 1323 )
bbbf2d40 1324);
1325
98b5789d 1326
bbbf2d40 1327?>