Updated the HEAD build version to 20090724
[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
94211250 303 // Permission to manage filter setting overrides in subcontexts.
304 'moodle/filter:manage' => array(
305
306 'captype' => 'write',
307 'contextlevel' => CONTEXT_COURSE,
308 'legacy' => array(
309 'editingteacher' => CAP_ALLOW,
310 'coursecreator' => CAP_ALLOW,
311 'admin' => CAP_ALLOW,
312 )
313 ),
6df3c7df 314
315 'moodle/user:create' => array(
316
317 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
eef868d1 318
bbbf2d40 319 'captype' => 'write',
320 'contextlevel' => CONTEXT_SYSTEM,
321 'legacy' => array(
bbbf2d40 322 'admin' => CAP_ALLOW
323 )
324 ),
eef868d1 325
6df3c7df 326 'moodle/user:delete' => array(
cc891abe 327
3a0c6cca 328 'riskbitmask' => RISK_PERSONAL, RISK_DATALOSS,
bcdb0f19 329
cc891abe 330 'captype' => 'write',
331 'contextlevel' => CONTEXT_SYSTEM,
332 'legacy' => array(
cc891abe 333 'admin' => CAP_ALLOW
334 )
335 ),
336
6df3c7df 337 'moodle/user:update' => array(
cc891abe 338
339 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
21b6db6e 340
bbbf2d40 341 'captype' => 'write',
342 'contextlevel' => CONTEXT_SYSTEM,
343 'legacy' => array(
bbbf2d40 344 'admin' => CAP_ALLOW
345 )
346 ),
eef868d1 347
bbbf2d40 348 'moodle/user:viewdetails' => array(
eef868d1 349
e58eca72 350 'captype' => 'read',
f432bebf 351 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 352 'legacy' => array(
22ae509e 353 'guest' => CAP_ALLOW,
354 'student' => CAP_ALLOW,
355 'teacher' => CAP_ALLOW,
356 'editingteacher' => CAP_ALLOW,
bbbf2d40 357 'admin' => CAP_ALLOW
358 )
359 ),
e58eca72 360
361 'moodle/user:viewhiddendetails' => array(
eef868d1 362
21b6db6e 363 'riskbitmask' => RISK_PERSONAL,
364
e58eca72 365 'captype' => 'read',
f432bebf 366 'contextlevel' => CONTEXT_COURSE,
e58eca72 367 'legacy' => array(
e58eca72 368 'teacher' => CAP_ALLOW,
369 'editingteacher' => CAP_ALLOW,
e58eca72 370 'admin' => CAP_ALLOW
371 )
372 ),
eef868d1 373
6c95827f 374 'moodle/user:loginas' => array(
375
376 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
377
378 'captype' => 'write',
379 'contextlevel' => CONTEXT_COURSE,
380 'legacy' => array(
6c95827f 381 'admin' => CAP_ALLOW
382 )
383 ),
384
bbbf2d40 385 'moodle/role:assign' => array(
eef868d1 386
3a0c6cca 387 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
388
bbbf2d40 389 'captype' => 'write',
f432bebf 390 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 391 'legacy' => array(
861fdcaa 392 'editingteacher' => CAP_ALLOW,
68c52526 393 'admin' => CAP_ALLOW
394 )
395 ),
eef868d1 396
68c52526 397 'moodle/role:override' => array(
eef868d1 398
bcdb0f19 399 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
400
68c52526 401 'captype' => 'write',
f432bebf 402 'contextlevel' => CONTEXT_COURSE,
68c52526 403 'legacy' => array(
bbbf2d40 404 'admin' => CAP_ALLOW
405 )
406 ),
eef868d1 407
3a0c6cca 408 'moodle/role:safeoverride' => array(
409
410 'riskbitmask' => RISK_SPAM,
411
412 'captype' => 'write',
f432bebf 413 'contextlevel' => CONTEXT_COURSE,
3a0c6cca 414 'legacy' => array(
415 'editingteacher' => CAP_ALLOW
416 )
417 ),
418
bbbf2d40 419 'moodle/role:manage' => array(
eef868d1 420
bcdb0f19 421 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
422
bbbf2d40 423 'captype' => 'write',
424 'contextlevel' => CONTEXT_SYSTEM,
425 'legacy' => array(
bbbf2d40 426 'admin' => CAP_ALLOW
427 )
428 ),
f43ce1ad 429
430 'moodle/role:unassignself' => array(
bcdb0f19 431
f43ce1ad 432 'captype' => 'write',
f432bebf 433 'contextlevel' => CONTEXT_COURSE,
f43ce1ad 434 'legacy' => array(
2d5a4f25 435 'student' => (empty($CFG->allowunenrol)) ? CAP_INHERIT : CAP_ALLOW,
f43ce1ad 436 'teacher' => CAP_ALLOW,
437 'editingteacher' => CAP_ALLOW,
438 'coursecreator' => CAP_ALLOW,
439 'admin' => CAP_ALLOW
440 )
441 ),
99f9cb51 442
443 'moodle/role:viewhiddenassigns' => array(
bcdb0f19 444
99f9cb51 445 'captype' => 'read',
f432bebf 446 'contextlevel' => CONTEXT_COURSE,
99f9cb51 447 'legacy' => array(
99f9cb51 448 'teacher' => CAP_ALLOW,
449 'editingteacher' => CAP_ALLOW,
99f9cb51 450 'admin' => CAP_ALLOW
451 )
452 ),
eef868d1 453
20dd4cf5 454 'moodle/role:switchroles' => array(
bcdb0f19 455
3a0c6cca 456 'riskbitmask' => RISK_XSS | RISK_PERSONAL,
bcdb0f19 457
20dd4cf5 458 'captype' => 'read',
f432bebf 459 'contextlevel' => CONTEXT_COURSE,
20dd4cf5 460 'legacy' => array(
20dd4cf5 461 'editingteacher' => CAP_ALLOW,
20dd4cf5 462 'admin' => CAP_ALLOW
463 )
464 ),
465
8ed5dd63 466 // Create, update and delete course categories. (Deleting a course category
467 // does not let you delete the courses it contains, unless you also have
468 // moodle/course: delete.) Creating and deleting requires this permission in
469 // the parent category.
470 'moodle/category:manage' => array(
eef868d1 471
89a792ab 472 'riskbitmask' => RISK_XSS,
473
bbbf2d40 474 'captype' => 'write',
475 'contextlevel' => CONTEXT_COURSECAT,
476 'legacy' => array(
bbbf2d40 477 'admin' => CAP_ALLOW
8ed5dd63 478 ),
479 'clonepermissionsfrom' => 'moodle/category:update'
bbbf2d40 480 ),
eef868d1 481
8ed5dd63 482 'moodle/category:viewhiddencategories' => array(
eef868d1 483
8ed5dd63 484 'captype' => 'read',
bbbf2d40 485 'contextlevel' => CONTEXT_COURSECAT,
486 'legacy' => array(
8ed5dd63 487 'coursecreator' => CAP_ALLOW,
bbbf2d40 488 'admin' => CAP_ALLOW
8ed5dd63 489 ),
490 'clonepermissionsfrom' => 'moodle/category:visibility'
bbbf2d40 491 ),
eef868d1 492
bbbf2d40 493 'moodle/course:create' => array(
eef868d1 494
21b6db6e 495 'riskbitmask' => RISK_XSS,
496
bbbf2d40 497 'captype' => 'write',
5e992f56 498 'contextlevel' => CONTEXT_COURSECAT,
bbbf2d40 499 'legacy' => array(
4473252d 500 'coursecreator' => CAP_ALLOW,
bbbf2d40 501 'admin' => CAP_ALLOW
502 )
503 ),
eef868d1 504
e452210a 505 'moodle/course:request' => array(
506 'captype' => 'write',
507 'contextlevel' => CONTEXT_SYSTEM,
508 'legacy' => array(
509 'user' => CAP_ALLOW,
510 )
511 ),
512
bbbf2d40 513 'moodle/course:delete' => array(
eef868d1 514
3a0c6cca 515 'riskbitmask' => RISK_DATALOSS,
516
bbbf2d40 517 'captype' => 'write',
518 'contextlevel' => CONTEXT_COURSE,
519 'legacy' => array(
9136a60c 520 'editingteacher' => CAP_ALLOW,
bbbf2d40 521 'admin' => CAP_ALLOW
522 )
523 ),
eef868d1 524
bbbf2d40 525 'moodle/course:update' => array(
eef868d1 526
21b6db6e 527 'riskbitmask' => RISK_XSS,
528
bbbf2d40 529 'captype' => 'write',
530 'contextlevel' => CONTEXT_COURSE,
531 'legacy' => array(
bbbf2d40 532 'editingteacher' => CAP_ALLOW,
bbbf2d40 533 'admin' => CAP_ALLOW
534 )
535 ),
eef868d1 536
bbbf2d40 537 'moodle/course:view' => array(
eef868d1 538
bbbf2d40 539 'captype' => 'read',
540 'contextlevel' => CONTEXT_COURSE,
541 'legacy' => array(
b0f55230 542 'guest' => CAP_ALLOW,
bbbf2d40 543 'student' => CAP_ALLOW,
544 'teacher' => CAP_ALLOW,
72cf2e39 545 'editingteacher' => CAP_ALLOW
bbbf2d40 546 )
547 ),
eef868d1 548
77c645df 549 'moodle/course:bulkmessaging' => array(
550
551 'riskbitmask' => RISK_SPAM,
552
553 'captype' => 'write',
554 'contextlevel' => CONTEXT_COURSE,
555 'legacy' => array(
77c645df 556 'teacher' => CAP_ALLOW,
557 'editingteacher' => CAP_ALLOW,
77c645df 558 'admin' => CAP_ALLOW
559 )
560 ),
561
1c45e42e 562 'moodle/course:viewhiddenuserfields' => array(
eef868d1 563
21b6db6e 564 'riskbitmask' => RISK_PERSONAL,
4e781c7b 565
566 'captype' => 'read',
567 'contextlevel' => CONTEXT_COURSE,
568 'legacy' => array(
569 'teacher' => CAP_ALLOW,
570 'editingteacher' => CAP_ALLOW,
571 'admin' => CAP_ALLOW
572 )
573 ),
574
1c45e42e 575 'moodle/course:viewhiddencourses' => array(
eef868d1 576
1c45e42e 577 'captype' => 'read',
578 'contextlevel' => CONTEXT_COURSE,
579 'legacy' => array(
2f5ab42b 580 'coursecreator' => CAP_ALLOW,
581 'teacher' => CAP_ALLOW,
582 'editingteacher' => CAP_ALLOW,
a5b8be62 583 'admin' => CAP_ALLOW
1c45e42e 584 )
585 ),
eef868d1 586
bbbf2d40 587 'moodle/course:visibility' => array(
eef868d1 588
bbbf2d40 589 'captype' => 'write',
590 'contextlevel' => CONTEXT_COURSE,
591 'legacy' => array(
bbbf2d40 592 'admin' => CAP_ALLOW
593 )
594 ),
eef868d1 595
a028c291 596 'moodle/course:managefiles' => array(
eef868d1 597
21b6db6e 598 'riskbitmask' => RISK_XSS,
599
a028c291 600 'captype' => 'write',
601 'contextlevel' => CONTEXT_COURSE,
602 'legacy' => array(
a028c291 603 'editingteacher' => CAP_ALLOW,
a028c291 604 'admin' => CAP_ALLOW
605 )
606 ),
eef868d1 607
bbbf2d40 608 'moodle/course:manageactivities' => array(
eef868d1 609
21b6db6e 610 'riskbitmask' => RISK_XSS,
611
bbbf2d40 612 'captype' => 'write',
613 'contextlevel' => CONTEXT_COURSE,
614 'legacy' => array(
bbbf2d40 615 'editingteacher' => CAP_ALLOW,
bbbf2d40 616 'admin' => CAP_ALLOW
617 )
618 ),
eef868d1 619
b79da3ac 620 'moodle/course:managemetacourse' => array(
eef868d1 621
3a0c6cca 622 'riskbitmask' => RISK_XSS | RISK_PERSONAL,
623
4b7aaf40 624 'captype' => 'write',
625 'contextlevel' => CONTEXT_COURSE,
626 'legacy' => array(
4b7aaf40 627 'editingteacher' => CAP_ALLOW,
4b7aaf40 628 'admin' => CAP_ALLOW
629 )
630 ),
eef868d1 631
bbbf2d40 632 'moodle/course:activityvisibility' => array(
eef868d1 633
bbbf2d40 634 'captype' => 'write',
635 'contextlevel' => CONTEXT_COURSE,
636 'legacy' => array(
bbbf2d40 637 'editingteacher' => CAP_ALLOW,
bbbf2d40 638 'admin' => CAP_ALLOW
639 )
640 ),
eef868d1 641
bbbf2d40 642 'moodle/course:viewhiddenactivities' => array(
eef868d1 643
bbbf2d40 644 'captype' => 'write',
645 'contextlevel' => CONTEXT_COURSE,
646 'legacy' => array(
bbbf2d40 647 'teacher' => CAP_ALLOW,
648 'editingteacher' => CAP_ALLOW,
bbbf2d40 649 'admin' => CAP_ALLOW
650 )
651 ),
eef868d1 652
bbbf2d40 653 'moodle/course:viewparticipants' => array(
eef868d1 654
bbbf2d40 655 'captype' => 'read',
656 'contextlevel' => CONTEXT_COURSE,
657 'legacy' => array(
bbbf2d40 658 'student' => CAP_ALLOW,
659 'teacher' => CAP_ALLOW,
660 'editingteacher' => CAP_ALLOW,
bbbf2d40 661 'admin' => CAP_ALLOW
165088f6 662 )
663 ),
f7c0d84b 664
665 'moodle/course:changefullname' => array(
666
cd7f72c0 667 'riskbitmask' => RISK_XSS,
668
f7c0d84b 669 'captype' => 'write',
670 'contextlevel' => CONTEXT_COURSE,
671 'legacy' => array(
672 'editingteacher' => CAP_ALLOW,
673 'admin' => CAP_ALLOW
5e99b9d7 674 ),
675 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 676 ),
677
678 'moodle/course:changeshortname' => array(
679
cd7f72c0 680 'riskbitmask' => RISK_XSS,
681
f7c0d84b 682 'captype' => 'write',
683 'contextlevel' => CONTEXT_COURSE,
684 'legacy' => array(
685 'editingteacher' => CAP_ALLOW,
686 'admin' => CAP_ALLOW
5e99b9d7 687 ),
688 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 689 ),
690
691 'moodle/course:changeidnumber' => array(
692
cd7f72c0 693 'riskbitmask' => RISK_XSS,
694
f7c0d84b 695 'captype' => 'write',
696 'contextlevel' => CONTEXT_COURSE,
697 'legacy' => array(
698 'editingteacher' => CAP_ALLOW,
699 'admin' => CAP_ALLOW
5e99b9d7 700 ),
701 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 702 ),
703
165088f6 704 'moodle/site:viewparticipants' => array(
705
706 'captype' => 'read',
707 'contextlevel' => CONTEXT_SYSTEM,
708 'legacy' => array(
709 'admin' => CAP_ALLOW
bbbf2d40 710 )
711 ),
eef868d1 712
d27c5d33 713 'moodle/site:usewebservices' => array(
714 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS,
715 'captype' => 'write',
716 'contextlevel' => CONTEXT_SYSTEM,
717 'legacy' => array()
718 ),
719
bbbf2d40 720 'moodle/course:viewscales' => array(
eef868d1 721
bbbf2d40 722 'captype' => 'read',
723 'contextlevel' => CONTEXT_COURSE,
724 'legacy' => array(
bbbf2d40 725 'student' => CAP_ALLOW,
726 'teacher' => CAP_ALLOW,
727 'editingteacher' => CAP_ALLOW,
bbbf2d40 728 'admin' => CAP_ALLOW
729 )
730 ),
eef868d1 731
bbbf2d40 732 'moodle/course:managescales' => array(
eef868d1 733
bbbf2d40 734 'captype' => 'write',
735 'contextlevel' => CONTEXT_COURSE,
736 'legacy' => array(
bbbf2d40 737 'editingteacher' => CAP_ALLOW,
bbbf2d40 738 'admin' => CAP_ALLOW
739 )
740 ),
eef868d1 741
bbbf2d40 742 'moodle/course:managegroups' => array(
743
744 'captype' => 'write',
745 'contextlevel' => CONTEXT_COURSE,
a028c291 746 'legacy' => array(
a028c291 747 'editingteacher' => CAP_ALLOW,
a028c291 748 'admin' => CAP_ALLOW
749 )
750 ),
eef868d1 751
a028c291 752 'moodle/course:reset' => array(
753
3a0c6cca 754 'riskbitmask' => RISK_DATALOSS,
755
a028c291 756 'captype' => 'write',
757 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 758 'legacy' => array(
bbbf2d40 759 'editingteacher' => CAP_ALLOW,
bbbf2d40 760 'admin' => CAP_ALLOW
761 )
762 ),
eef868d1 763
bbbf2d40 764 'moodle/blog:view' => array(
765
766 'captype' => 'read',
f432bebf 767 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 768 'legacy' => array(
00adf177 769 'guest' => CAP_ALLOW,
c785d40a 770 'user' => CAP_ALLOW,
bbbf2d40 771 'student' => CAP_ALLOW,
772 'teacher' => CAP_ALLOW,
773 'editingteacher' => CAP_ALLOW,
bbbf2d40 774 'admin' => CAP_ALLOW
775 )
776 ),
eef868d1 777
5a8ab2e9 778 'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 779
21b6db6e 780 'riskbitmask' => RISK_SPAM,
781
bbbf2d40 782 'captype' => 'write',
783 'contextlevel' => CONTEXT_SYSTEM,
784 'legacy' => array(
c785d40a 785 'user' => CAP_ALLOW,
bbbf2d40 786 'admin' => CAP_ALLOW
787 )
788 ),
eef868d1 789
bbbf2d40 790 'moodle/blog: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 )
801 ),
eef868d1 802
5a8ab2e9 803 'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 804
21b6db6e 805 'riskbitmask' => RISK_SPAM,
806
bbbf2d40 807 'captype' => 'write',
f432bebf 808 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 809 'legacy' => array(
c785d40a 810 'user' => CAP_ALLOW,
bbbf2d40 811 'admin' => CAP_ALLOW
812 )
813 ),
eef868d1 814
f63d2922 815 'moodle/calendar:managegroupentries' => array(
816
817 'riskbitmask' => RISK_SPAM,
818
819 'captype' => 'write',
f432bebf 820 'contextlevel' => CONTEXT_COURSE,
f63d2922 821 'legacy' => array(
822 'teacher' => CAP_ALLOW,
823 'editingteacher' => CAP_ALLOW,
824 'admin' => CAP_ALLOW
825 )
826 ),
827
bbbf2d40 828 'moodle/calendar:manageentries' => array(
829
21b6db6e 830 'riskbitmask' => RISK_SPAM,
831
bbbf2d40 832 'captype' => 'write',
f432bebf 833 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 834 'legacy' => array(
bbbf2d40 835 'teacher' => CAP_ALLOW,
836 'editingteacher' => CAP_ALLOW,
bbbf2d40 837 'admin' => CAP_ALLOW
838 )
77d4953e 839 ),
a044c05d 840
841 'moodle/user:editprofile' => array(
842
3a0c6cca 843 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
a044c05d 844
845 'captype' => 'write',
846 'contextlevel' => CONTEXT_USER,
847 'legacy' => array(
848 'admin' => CAP_ALLOW
849 )
850 ),
eef868d1 851
a5b8be62 852 'moodle/user:editownprofile' => array(
1cb3da36 853
3a0c6cca 854 'riskbitmask' => RISK_SPAM,
855
a5b8be62 856 'captype' => 'write',
857 'contextlevel' => CONTEXT_SYSTEM,
858 'legacy' => array(
1cb3da36 859 'guest' => CAP_PROHIBIT,
860 'user' => CAP_ALLOW,
861 'admin' => CAP_ALLOW
a5b8be62 862 )
1cb3da36 863 ),
864
a5b8be62 865 'moodle/user:changeownpassword' => array(
1cb3da36 866
a5b8be62 867 'captype' => 'write',
868 'contextlevel' => CONTEXT_SYSTEM,
869 'legacy' => array(
1cb3da36 870 'guest' => CAP_PROHIBIT,
871 'user' => CAP_ALLOW,
872 'admin' => CAP_ALLOW
a5b8be62 873 )
1cb3da36 874 ),
875
eef868d1 876 // The next 3 might make no sense for some roles, e.g teacher, etc.
77d4953e 877 // since the next level up is site. These are more for the parent role
878 'moodle/user:readuserposts' => 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
77d4953e 890 'moodle/user:readuserblogs' => array(
bcdb0f19 891
77d4953e 892 'captype' => 'read',
4b10f08b 893 'contextlevel' => CONTEXT_USER,
77d4953e 894 'legacy' => array(
77d4953e 895 'student' => CAP_ALLOW,
896 'teacher' => CAP_ALLOW,
897 'editingteacher' => CAP_ALLOW,
77d4953e 898 'admin' => CAP_ALLOW
899 )
900 ),
eef868d1 901
3c7da16d 902 // designed for parent role - not used in legacy roles
77d4953e 903 'moodle/user:viewuseractivitiesreport' => array(
3c7da16d 904 'riskbitmask' => RISK_PERSONAL,
bcdb0f19 905
77d4953e 906 'captype' => 'read',
4b10f08b 907 'contextlevel' => CONTEXT_USER,
77d4953e 908 'legacy' => array(
77d4953e 909 )
945f88ca 910 ),
4e781c7b 911
3b120e46 912 //capabilities designed for the new message system configuration
913 'moodle/user:editmessageprofile' => array(
f7c0d84b 914
3b120e46 915 'riskbitmask' => RISK_SPAM,
f7c0d84b 916
3b120e46 917 'captype' => 'write',
918 'contextlevel' => CONTEXT_USER,
919 'legacy' => array(
920 'admin' => CAP_ALLOW
921 )
922 ),
f7c0d84b 923
924 'moodle/user:editownmessageprofile' => array(
925
926 'captype' => 'write',
927 'contextlevel' => CONTEXT_SYSTEM,
928 'legacy' => array(
3b120e46 929 'guest' => CAP_PROHIBIT,
930 'user' => CAP_ALLOW,
931 'admin' => CAP_ALLOW
f7c0d84b 932 )
3b120e46 933 ),
eef868d1 934
271e6dec 935 'moodle/question:managecategory' => array(
14d701d6 936 'riskbitmask' => RISK_SPAM | RISK_XSS,
945f88ca 937 'captype' => 'write',
938 'contextlevel' => CONTEXT_COURSE,
939 'legacy' => array(
945f88ca 940 'editingteacher' => CAP_ALLOW,
945f88ca 941 'admin' => CAP_ALLOW
942 )
a5b8be62 943 ),
944
271e6dec 945 //new in moodle 1.9
946 'moodle/question:add' => array(
14d701d6 947 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 948 'captype' => 'write',
949 'contextlevel' => CONTEXT_COURSE,
950 'legacy' => array(
951 'editingteacher' => CAP_ALLOW,
952 'admin' => CAP_ALLOW
953 ),
954 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 955 ),
271e6dec 956 'moodle/question:editmine' => array(
14d701d6 957 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 958 'captype' => 'write',
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:editall' => array(
14d701d6 967 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 968 'captype' => 'write',
969 'contextlevel' => CONTEXT_COURSE,
970 'legacy' => array(
971 'editingteacher' => CAP_ALLOW,
972 'admin' => CAP_ALLOW
973 ),
a5b8be62 974 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 975 ),
976 'moodle/question:viewmine' => array(
945f88ca 977 'captype' => 'read',
978 'contextlevel' => CONTEXT_COURSE,
979 'legacy' => array(
945f88ca 980 'editingteacher' => CAP_ALLOW,
945f88ca 981 'admin' => CAP_ALLOW
271e6dec 982 ),
a5b8be62 983 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 984 ),
271e6dec 985 'moodle/question:viewall' => array(
986 'captype' => 'read',
987 'contextlevel' => CONTEXT_COURSE,
988 'legacy' => array(
989 'editingteacher' => CAP_ALLOW,
990 'admin' => CAP_ALLOW
991 ),
a5b8be62 992 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 993 ),
994 'moodle/question:usemine' => array(
995 'captype' => 'read',
996 'contextlevel' => CONTEXT_COURSE,
997 'legacy' => array(
998 'editingteacher' => CAP_ALLOW,
999 'admin' => CAP_ALLOW
1000 ),
a5b8be62 1001 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1002 ),
1003 'moodle/question:useall' => array(
1004 'captype' => 'read',
1005 'contextlevel' => CONTEXT_COURSE,
1006 'legacy' => array(
1007 'editingteacher' => CAP_ALLOW,
1008 'admin' => CAP_ALLOW
1009 ),
a5b8be62 1010 'clonepermissionsfrom' => 'moodle/question:manage'
1011 ),
271e6dec 1012 'moodle/question:movemine' => array(
945f88ca 1013 'captype' => 'write',
1014 'contextlevel' => CONTEXT_COURSE,
1015 'legacy' => array(
945f88ca 1016 'editingteacher' => CAP_ALLOW,
945f88ca 1017 'admin' => CAP_ALLOW
271e6dec 1018 ),
a5b8be62 1019 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1020 ),
271e6dec 1021 'moodle/question:moveall' => array(
945f88ca 1022 'captype' => 'write',
1023 'contextlevel' => CONTEXT_COURSE,
1024 'legacy' => array(
945f88ca 1025 'editingteacher' => CAP_ALLOW,
945f88ca 1026 'admin' => CAP_ALLOW
271e6dec 1027 ),
a5b8be62 1028 'clonepermissionsfrom' => 'moodle/question:manage'
7191a1fa 1029 ),
271e6dec 1030 //END new in moodle 1.9
a5b8be62 1031
0eb6b04a 1032 // Configure the installed question types.
1033 'moodle/question:config' => array(
0eb6b04a 1034 'riskbitmask' => RISK_CONFIG,
0eb6b04a 1035 'captype' => 'write',
1036 'contextlevel' => CONTEXT_SYSTEM,
1037 'legacy' => array(
1038 'admin' => CAP_ALLOW
1039 )
1040 ),
1041
62e76c67 1042 // While attempting questions, the ability to flag particular questions for later reference.
1043 'moodle/question:flag' => array(
1044 'captype' => 'write',
1045 'contextlevel' => CONTEXT_COURSE,
1046 'legacy' => array(
1047 'student' => CAP_ALLOW,
1048 'teacher' => CAP_ALLOW,
1049 'editingteacher' => CAP_ALLOW,
1050 'coursecreator' => CAP_ALLOW,
1051 'admin' => CAP_ALLOW
1052 )
1053 ),
bcdb0f19 1054
62e76c67 1055 'moodle/site:doclinks' => array(
7191a1fa 1056 'captype' => 'read',
1057 'contextlevel' => CONTEXT_SYSTEM,
1058 'legacy' => array(
7191a1fa 1059 'teacher' => CAP_ALLOW,
1060 'editingteacher' => CAP_ALLOW,
7191a1fa 1061 'admin' => CAP_ALLOW
1062 )
3924b988 1063 ),
eef868d1 1064
3924b988 1065 'moodle/course:sectionvisibility' => array(
bcdb0f19 1066
3924b988 1067 'captype' => 'write',
1068 'contextlevel' => CONTEXT_COURSE,
1069 'legacy' => array(
3924b988 1070 'editingteacher' => CAP_ALLOW,
3924b988 1071 'admin' => CAP_ALLOW
1072 )
1073 ),
eef868d1 1074
dc558690 1075 'moodle/course:useremail' => array(
bcdb0f19 1076
dc558690 1077 'captype' => 'write',
1078 'contextlevel' => CONTEXT_COURSE,
1079 'legacy' => array(
dc558690 1080 'editingteacher' => CAP_ALLOW,
dc558690 1081 'admin' => CAP_ALLOW
1082 )
1083 ),
eef868d1 1084
3924b988 1085 'moodle/course:viewhiddensections' => array(
bcdb0f19 1086
3924b988 1087 'captype' => 'write',
1088 'contextlevel' => CONTEXT_COURSE,
1089 'legacy' => array(
3924b988 1090 'editingteacher' => CAP_ALLOW,
3924b988 1091 'admin' => CAP_ALLOW
1092 )
1093 ),
eef868d1 1094
3924b988 1095 'moodle/course:setcurrentsection' => array(
bcdb0f19 1096
3924b988 1097 'captype' => 'write',
1098 'contextlevel' => CONTEXT_COURSE,
1099 'legacy' => array(
3924b988 1100 'editingteacher' => CAP_ALLOW,
3924b988 1101 'admin' => CAP_ALLOW
1102 )
1103 ),
eef868d1 1104
dd45888a 1105 'moodle/site:mnetlogintoremote' => array(
bc4c9800 1106
3924b988 1107 'captype' => 'read',
dd45888a 1108 'contextlevel' => CONTEXT_SYSTEM,
3924b988 1109 'legacy' => array(
3924b988 1110 'admin' => CAP_ALLOW
1111 )
1112 ),
eef868d1 1113
dd45888a 1114 'moodle/grade:viewall' => array(
bcdb0f19 1115 'riskbitmask' => RISK_PERSONAL,
dd45888a 1116 'captype' => 'read',
eecf76df 1117 'contextlevel' => CONTEXT_COURSE, // and CONTEXT_USER
3924b988 1118 'legacy' => array(
dd45888a 1119 'teacher' => CAP_ALLOW,
3924b988 1120 'editingteacher' => CAP_ALLOW,
3924b988 1121 'admin' => CAP_ALLOW
dd45888a 1122 ),
1123 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
f509ce06 1124 ),
f43ce1ad 1125
dd45888a 1126 'moodle/grade:view' => array(
f509ce06 1127 'captype' => 'read',
eecf76df 1128 'contextlevel' => CONTEXT_COURSE,
f509ce06 1129 'legacy' => array(
dd45888a 1130 'student' => CAP_ALLOW
f509ce06 1131 )
ca9ffa18 1132 ),
dd45888a 1133
1134 'moodle/grade:viewhidden' => array(
ca9ffa18 1135 'riskbitmask' => RISK_PERSONAL,
1136 'captype' => 'read',
eecf76df 1137 'contextlevel' => CONTEXT_COURSE,
ca9ffa18 1138 'legacy' => array(
0371f8e5 1139 'teacher' => CAP_ALLOW,
1140 'editingteacher' => CAP_ALLOW,
1141 'admin' => CAP_ALLOW
dd45888a 1142 ),
1143 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
ca9ffa18 1144 ),
dd45888a 1145
1146 'moodle/grade:import' => array(
3a0c6cca 1147 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1148 'captype' => 'write',
ca9ffa18 1149 'contextlevel' => CONTEXT_COURSE,
1150 'legacy' => array(
ca9ffa18 1151 'editingteacher' => CAP_ALLOW,
1152 'admin' => CAP_ALLOW
dd45888a 1153 ),
1154 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1155 ),
dd45888a 1156
1157 'moodle/grade:export' => array(
ca9ffa18 1158 'riskbitmask' => RISK_PERSONAL,
1159 'captype' => 'read',
1160 'contextlevel' => CONTEXT_COURSE,
1161 'legacy' => array(
1162 'teacher' => CAP_ALLOW,
1163 'editingteacher' => CAP_ALLOW,
1164 'admin' => CAP_ALLOW
dd45888a 1165 ),
1166 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1167 ),
dd45888a 1168
1169 'moodle/grade:manage' => array(
3a0c6cca 1170 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1171 'captype' => 'write',
1172 'contextlevel' => CONTEXT_COURSE,
ca9ffa18 1173 'legacy' => array(
dd45888a 1174 'editingteacher' => CAP_ALLOW,
ca9ffa18 1175 'admin' => CAP_ALLOW
dd45888a 1176 ),
1177 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1178 ),
dd45888a 1179
a5b8be62 1180 'moodle/grade:edit' => array(
1181 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
04259694 1182 'captype' => 'write',
1183 'contextlevel' => CONTEXT_COURSE,
1184 'legacy' => array(
1185 'editingteacher' => CAP_ALLOW,
1186 'admin' => CAP_ALLOW
1187 ),
1188 'clonepermissionsfrom' => 'moodle/course:managegrades'
1189 ),
1190
a5b8be62 1191 'moodle/grade:manageoutcomes' => array(
284abb09 1192 'captype' => 'write',
1193 'contextlevel' => CONTEXT_COURSE,
1194 'legacy' => array(
1195 'editingteacher' => CAP_ALLOW,
1196 'admin' => CAP_ALLOW
1197 ),
1198 'clonepermissionsfrom' => 'moodle/course:managegrades'
1199 ),
1200
1201 'moodle/grade:manageletters' => array(
ca9ffa18 1202 'captype' => 'write',
1203 'contextlevel' => CONTEXT_COURSE,
1204 'legacy' => array(
1205 'editingteacher' => CAP_ALLOW,
1206 'admin' => CAP_ALLOW
a5b8be62 1207 ),
1208 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1209 ),
dd45888a 1210
a5b8be62 1211 'moodle/grade:hide' => array(
ca9ffa18 1212 'captype' => 'write',
1213 'contextlevel' => CONTEXT_COURSE,
1214 'legacy' => array(
1215 'editingteacher' => CAP_ALLOW,
1216 'admin' => CAP_ALLOW
1217 )
1218 ),
dd45888a 1219
a5b8be62 1220 'moodle/grade:lock' => array(
dd45888a 1221 'captype' => 'write',
ca9ffa18 1222 'contextlevel' => CONTEXT_COURSE,
1223 'legacy' => array(
1224 'editingteacher' => CAP_ALLOW,
1225 'admin' => CAP_ALLOW
1226 )
1227 ),
dd45888a 1228
a5b8be62 1229 'moodle/grade:unlock' => array(
ca9ffa18 1230 'captype' => 'write',
1231 'contextlevel' => CONTEXT_COURSE,
1232 'legacy' => array(
1233 'editingteacher' => CAP_ALLOW,
1234 'admin' => CAP_ALLOW
1235 )
282c1695 1236 ),
dd45888a 1237
1238 'moodle/my:manageblocks' => array(
282c1695 1239 'captype' => 'write',
1240 'contextlevel' => CONTEXT_SYSTEM,
1241 'legacy' => array(
1242 'user' => CAP_ALLOW
1243 )
eca3af25 1244 ),
dd45888a 1245
eca3af25 1246 'moodle/notes:view' => array(
1247 'captype' => 'read',
f432bebf 1248 'contextlevel' => CONTEXT_COURSE,
eca3af25 1249 'legacy' => array(
1250 'teacher' => CAP_ALLOW,
1251 'editingteacher' => CAP_ALLOW,
1252 'admin' => CAP_ALLOW
1253 )
1254 ),
1255
1256 'moodle/notes:manage' => array(
3a0c6cca 1257 'riskbitmask' => RISK_SPAM,
1258
eca3af25 1259 'captype' => 'write',
f432bebf 1260 'contextlevel' => CONTEXT_COURSE,
eca3af25 1261 'legacy' => array(
1262 'teacher' => CAP_ALLOW,
1263 'editingteacher' => CAP_ALLOW,
1264 'admin' => CAP_ALLOW
1265 )
dd45888a 1266 ),
79642064 1267
1268 'moodle/tag:manage' => array(
3a0c6cca 1269 'riskbitmask' => RISK_SPAM,
1270
79642064 1271 'captype' => 'write',
1272 'contextlevel' => CONTEXT_SYSTEM,
1273 'legacy' => array(
1274 'teacher' => CAP_ALLOW,
1275 'editingteacher' => CAP_ALLOW,
1276 'admin' => CAP_ALLOW
1277 )
705789bd 1278 ),
1279
1280 'moodle/tag:create' => array(
3a0c6cca 1281 'riskbitmask' => RISK_SPAM,
1282
705789bd 1283 'captype' => 'write',
1284 'contextlevel' => CONTEXT_SYSTEM,
1285 'legacy' => array(
0f07c40e 1286 'admin' => CAP_ALLOW,
1287 'user' => CAP_ALLOW
705789bd 1288 )
1289 ),
a5b8be62 1290
705789bd 1291 'moodle/tag:edit' => array(
3a0c6cca 1292 'riskbitmask' => RISK_SPAM,
1293
705789bd 1294 'captype' => 'write',
1295 'contextlevel' => CONTEXT_SYSTEM,
1296 'legacy' => array(
3e6e529f 1297 'admin' => CAP_ALLOW,
1298 'user' => CAP_ALLOW
98b5789d 1299 )
1300 ),
a5b8be62 1301
98b5789d 1302 'moodle/tag:editblocks' => array(
1303 'captype' => 'write',
1304 'contextlevel' => CONTEXT_SYSTEM,
1305 'legacy' => array(
705789bd 1306 'teacher' => CAP_ALLOW,
1307 'editingteacher' => CAP_ALLOW,
1308 'admin' => CAP_ALLOW
1309 )
7e874772 1310 ),
1311
1312 'moodle/block:view' => array(
1313 'captype' => 'read',
1314 'contextlevel' => CONTEXT_BLOCK,
1315 'legacy' => array(
1316 'guest' => CAP_ALLOW,
25a7d980 1317 'user' => CAP_ALLOW,
1318 'student' => CAP_ALLOW,
1319 'teacher' => CAP_ALLOW,
1320 'editingteacher' => CAP_ALLOW,
1321 'coursecreator' => CAP_ALLOW
7e874772 1322 )
8512f577 1323 ),
1324
1325 'moodle/portfolio:export' => array(
1326 'captype' => 'read',
1327 'contextlevel' => CONTEXT_SYSTEM,
1328 'legacy' => array(
1329 'user' => CAP_ALLOW,
1330 'student' => CAP_ALLOW,
1331 'teacher' => CAP_ALLOW,
1332 'editingteacher' => CAP_ALLOW,
1333 'coursecreator' => CAP_ALLOW
1334 )
79642064 1335 )
bbbf2d40 1336);
1337
98b5789d 1338
bbbf2d40 1339?>