fixed some more warnings in uploaduser.php script
[moodle.git] / lib / db / access.php
CommitLineData
bbbf2d40 1<?php
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(
35
36 'moodle/site:doanything' => array(
37 'captype' => 'admin',
38 'contextlevel' => CONTEXT_SYSTEM
39 ),
40
41 'moodle/legacy:guest' => array(
42 'captype' => 'legacy',
43 'contextlevel' => CONTEXT_SYSTEM
44 ),
45
46
47 'moodle/legacy:student' => array(
48 'captype' => 'legacy',
49 'contextlevel' => CONTEXT_SYSTEM
50 ),
51
52
53 'moodle/legacy:teacher' => array(
54 'captype' => 'legacy',
55 'contextlevel' => CONTEXT_SYSTEM
56 ),
57
58
59 'moodle/legacy:editingteacher' => array(
60 'captype' => 'legacy',
61 'contextlevel' => CONTEXT_SYSTEM
62 ),
63
64
65 'moodle/legacy:coursecreator' => array(
66 'captype' => 'legacy',
67 'contextlevel' => CONTEXT_SYSTEM
68 ),
69
70
71 'moodle/legacy:admin' => array(
72 'captype' => 'legacy',
73 'contextlevel' => CONTEXT_SYSTEM
74 ),
75
76
77 'moodle/site:config' => array(
78
79 'captype' => 'write',
80 'contextlevel' => CONTEXT_SYSTEM,
81 'legacy' => array(
82 'guest' => CAP_PREVENT,
83 'student' => CAP_PREVENT,
84 'teacher' => CAP_PREVENT,
85 'editingteacher' => CAP_PREVENT,
86 'coursecreator' => CAP_PREVENT,
87 'admin' => CAP_ALLOW
88 )
89 ),
90
51792df0 91 'moodle/site:readallmessages' => array(
92
93 'captype' => 'read',
94 'contextlevel' => CONTEXT_SYSTEM,
95 'legacy' => array(
96 'guest' => CAP_PREVENT,
97 'student' => CAP_PREVENT,
98 'teacher' => CAP_PREVENT,
99 'editingteacher' => CAP_PREVENT,
100 'coursecreator' => CAP_PREVENT,
101 'admin' => CAP_ALLOW
102 )
103 ),
104
105 'moodle/site:approvecourse' => array(
106
107 'captype' => 'write',
108 'contextlevel' => CONTEXT_SYSTEM,
109 'legacy' => array(
110 'guest' => CAP_PREVENT,
111 'student' => CAP_PREVENT,
112 'teacher' => CAP_PREVENT,
113 'editingteacher' => CAP_PREVENT,
114 'coursecreator' => CAP_PREVENT,
115 'admin' => CAP_ALLOW
116 )
117 ),
118
bbbf2d40 119 'moodle/site:import' => array(
120
121 'captype' => 'write',
122 'contextlevel' => CONTEXT_SYSTEM,
123 'legacy' => array(
124 'guest' => CAP_PREVENT,
125 'student' => CAP_PREVENT,
a028c291 126 'teacher' => CAP_ALLOW,
127 'editingteacher' => CAP_ALLOW,
128 'coursecreator' => CAP_ALLOW,
bbbf2d40 129 'admin' => CAP_ALLOW
130 )
131 ),
132
133 'moodle/site:backup' => array(
134
135 'captype' => 'write',
136 'contextlevel' => CONTEXT_SYSTEM,
137 'legacy' => array(
138 'guest' => CAP_PREVENT,
139 'student' => CAP_PREVENT,
140 'teacher' => CAP_PREVENT,
141 'editingteacher' => CAP_PREVENT,
142 'coursecreator' => CAP_PREVENT,
143 'admin' => CAP_ALLOW
144 )
145 ),
146
147 'moodle/site:restore' => array(
148
149 'captype' => 'write',
150 'contextlevel' => CONTEXT_SYSTEM,
151 'legacy' => array(
152 'guest' => CAP_PREVENT,
153 'student' => CAP_PREVENT,
154 'teacher' => CAP_PREVENT,
155 'editingteacher' => CAP_PREVENT,
156 'coursecreator' => CAP_PREVENT,
157 'admin' => CAP_ALLOW
158 )
159 ),
160
161 'moodle/site:manageblocks' => array(
162
163 'captype' => 'write',
164 'contextlevel' => CONTEXT_SYSTEM,
165 'legacy' => array(
166 'guest' => CAP_PREVENT,
167 'student' => CAP_PREVENT,
168 'teacher' => CAP_PREVENT,
73b73d21 169 'editingteacher' => CAP_ALLOW,
170 'coursecreator' => CAP_ALLOW,
bbbf2d40 171 'admin' => CAP_ALLOW
172 )
173 ),
174
27950688 175 'moodle/site:accessallgroups' => array(
176
177 'captype' => 'read',
178 'contextlevel' => CONTEXT_SYSTEM,
179 'legacy' => array(
180 'guest' => CAP_PREVENT,
181 'student' => CAP_PREVENT,
182 'teacher' => CAP_ALLOW,
183 'editingteacher' => CAP_ALLOW,
184 'coursecreator' => CAP_ALLOW,
185 'admin' => CAP_ALLOW
186 )
187 ),
188
53d7785b 189 'moodle/site:viewfullnames' => array(
190
191 'captype' => 'read',
192 'contextlevel' => CONTEXT_SYSTEM,
193 'legacy' => array(
194 'guest' => CAP_PREVENT,
195 'student' => CAP_PREVENT,
196 'teacher' => CAP_ALLOW,
197 'editingteacher' => CAP_ALLOW,
198 'coursecreator' => CAP_ALLOW,
199 'admin' => CAP_ALLOW
200 )
201 ),
202
a028c291 203 'moodle/site:viewreports' => array(
204
205 'captype' => 'read',
77d4953e 206 'contextlevel' => CONTEXT_SYSTEM,
a028c291 207 'legacy' => array(
208 'guest' => CAP_PREVENT,
209 'student' => CAP_PREVENT,
210 'teacher' => CAP_ALLOW,
211 'editingteacher' => CAP_ALLOW,
212 'coursecreator' => CAP_ALLOW,
213 'admin' => CAP_ALLOW
214 )
215 ),
216
7d8a3cb0 217 'moodle/site:trustcontent' => array(
218
219 'captype' => 'write',
220 'contextlevel' => CONTEXT_SYSTEM,
221 'legacy' => array(
222 'guest' => CAP_PREVENT,
223 'student' => CAP_PREVENT,
224 'teacher' => CAP_PREVENT,
225 'editingteacher' => CAP_ALLOW,
226 'coursecreator' => CAP_ALLOW,
227 'admin' => CAP_ALLOW
228 )
229 ),
230
bbbf2d40 231 'moodle/user:create' => array(
232
233 'captype' => 'write',
234 'contextlevel' => CONTEXT_SYSTEM,
235 'legacy' => array(
236 'guest' => CAP_PREVENT,
237 'student' => CAP_PREVENT,
238 'teacher' => CAP_PREVENT,
239 'editingteacher' => CAP_PREVENT,
240 'coursecreator' => CAP_PREVENT,
241 'admin' => CAP_ALLOW
242 )
243 ),
244
245 'moodle/user:delete' => array(
246
247 'captype' => 'write',
248 'contextlevel' => CONTEXT_SYSTEM,
249 'legacy' => array(
250 'guest' => CAP_PREVENT,
251 'student' => CAP_PREVENT,
252 'teacher' => CAP_PREVENT,
253 'editingteacher' => CAP_PREVENT,
254 'coursecreator' => CAP_PREVENT,
255 'admin' => CAP_ALLOW
256 )
257 ),
258
259 'moodle/user:update' => array(
260
261 'captype' => 'write',
262 'contextlevel' => CONTEXT_SYSTEM,
263 'legacy' => array(
264 'guest' => CAP_PREVENT,
265 'student' => CAP_PREVENT,
266 'teacher' => CAP_PREVENT,
267 'editingteacher' => CAP_PREVENT,
268 'coursecreator' => CAP_PREVENT,
269 'admin' => CAP_ALLOW
270 )
271 ),
272
273 'moodle/user:viewdetails' => array(
274
e58eca72 275 'captype' => 'read',
bbbf2d40 276 'contextlevel' => CONTEXT_SYSTEM,
277 'legacy' => array(
278 'guest' => CAP_PREVENT,
279 'student' => CAP_ALLOW,
280 'teacher' => CAP_ALLOW,
281 'editingteacher' => CAP_ALLOW,
282 'coursecreator' => CAP_ALLOW,
283 'admin' => CAP_ALLOW
284 )
285 ),
e58eca72 286
287 'moodle/user:viewhiddendetails' => array(
288
289 'captype' => 'read',
290 'contextlevel' => CONTEXT_SYSTEM,
291 'legacy' => array(
292 'guest' => CAP_PREVENT,
293 'student' => CAP_PREVENT,
294 'teacher' => CAP_ALLOW,
295 'editingteacher' => CAP_ALLOW,
296 'coursecreator' => CAP_ALLOW,
297 'admin' => CAP_ALLOW
298 )
299 ),
bbbf2d40 300
301 'moodle/role:assign' => array(
302
303 'captype' => 'write',
304 'contextlevel' => CONTEXT_SYSTEM,
305 'legacy' => array(
306 'guest' => CAP_PREVENT,
68c52526 307 'student' => CAP_PREVENT,
308 'teacher' => CAP_PREVENT,
309 'editingteacher' => CAP_PREVENT,
310 'coursecreator' => CAP_PREVENT,
311 'admin' => CAP_ALLOW
312 )
313 ),
314
315 'moodle/role:override' => array(
316
317 'captype' => 'write',
318 'contextlevel' => CONTEXT_SYSTEM,
319 'legacy' => array(
320 'guest' => CAP_PREVENT,
bbbf2d40 321 'student' => CAP_PREVENT,
322 'teacher' => CAP_PREVENT,
323 'editingteacher' => CAP_PREVENT,
324 'coursecreator' => CAP_PREVENT,
325 'admin' => CAP_ALLOW
326 )
327 ),
328
329 'moodle/role:manage' => array(
330
331 'captype' => 'write',
332 'contextlevel' => CONTEXT_SYSTEM,
333 'legacy' => array(
334 'guest' => CAP_PREVENT,
335 'student' => CAP_PREVENT,
336 'teacher' => CAP_PREVENT,
337 'editingteacher' => CAP_PREVENT,
338 'coursecreator' => CAP_PREVENT,
339 'admin' => CAP_ALLOW
340 )
341 ),
f43ce1ad 342
343 'moodle/role:unassignself' => array(
344 'captype' => 'write',
345 'contextlevel' => CONTEXT_SYSTEM,
346 'legacy' => array(
347 'guest' => CAP_PREVENT,
348 'student' => (empty($CFG->allowunenrol)) ? CAP_PREVENT : CAP_ALLOW,
349 'teacher' => CAP_ALLOW,
350 'editingteacher' => CAP_ALLOW,
351 'coursecreator' => CAP_ALLOW,
352 'admin' => CAP_ALLOW
353 )
354 ),
99f9cb51 355
356 'moodle/role:viewhiddenassigns' => array(
357 'captype' => 'read',
358 'contextlevel' => CONTEXT_SYSTEM,
359 'legacy' => array(
360 'guest' => CAP_PREVENT,
361 'student' => CAP_PREVENT,
362 'teacher' => CAP_ALLOW,
363 'editingteacher' => CAP_ALLOW,
364 'coursecreator' => CAP_ALLOW,
365 'admin' => CAP_ALLOW
366 )
367 ),
bbbf2d40 368
369 'moodle/category:create' => array(
370
371 'captype' => 'write',
372 'contextlevel' => CONTEXT_COURSECAT,
373 'legacy' => array(
374 'guest' => CAP_PREVENT,
375 'student' => CAP_PREVENT,
376 'teacher' => CAP_PREVENT,
377 'editingteacher' => CAP_PREVENT,
378 'coursecreator' => CAP_PREVENT,
379 'admin' => CAP_ALLOW
380 )
381 ),
382
383 'moodle/category:delete' => array(
384
385 'captype' => 'write',
386 'contextlevel' => CONTEXT_COURSECAT,
387 'legacy' => array(
388 'guest' => CAP_PREVENT,
389 'student' => CAP_PREVENT,
390 'teacher' => CAP_PREVENT,
391 'editingteacher' => CAP_PREVENT,
392 'coursecreator' => CAP_PREVENT,
393 'admin' => CAP_ALLOW
394 )
395 ),
396
397 'moodle/category:update' => array(
398
399 'captype' => 'write',
400 'contextlevel' => CONTEXT_COURSECAT,
401 'legacy' => array(
402 'guest' => CAP_PREVENT,
403 'student' => CAP_PREVENT,
404 'teacher' => CAP_PREVENT,
405 'editingteacher' => CAP_PREVENT,
406 'coursecreator' => CAP_PREVENT,
407 'admin' => CAP_ALLOW
408 )
409 ),
410
411 'moodle/category:visibility' => array(
412
413 'captype' => 'write',
414 'contextlevel' => CONTEXT_COURSECAT,
415 'legacy' => array(
416 'guest' => CAP_PREVENT,
417 'student' => CAP_PREVENT,
418 'teacher' => CAP_PREVENT,
419 'editingteacher' => CAP_PREVENT,
420 'coursecreator' => CAP_PREVENT,
421 'admin' => CAP_ALLOW
422 )
423 ),
424
425 'moodle/course:create' => array(
426
427 'captype' => 'write',
428 'contextlevel' => CONTEXT_COURSE,
429 'legacy' => array(
430 'guest' => CAP_PREVENT,
431 'student' => CAP_PREVENT,
432 'teacher' => CAP_PREVENT,
433 'editingteacher' => CAP_PREVENT,
434 'coursecreator' => CAP_PREVENT,
435 'admin' => CAP_ALLOW
436 )
437 ),
438
439 'moodle/course:delete' => array(
440
441 'captype' => 'write',
442 'contextlevel' => CONTEXT_COURSE,
443 'legacy' => array(
444 'guest' => CAP_PREVENT,
445 'student' => CAP_PREVENT,
446 'teacher' => CAP_PREVENT,
447 'editingteacher' => CAP_PREVENT,
448 'coursecreator' => CAP_PREVENT,
449 'admin' => CAP_ALLOW
450 )
451 ),
452
453 'moodle/course:update' => array(
454
455 'captype' => 'write',
456 'contextlevel' => CONTEXT_COURSE,
457 'legacy' => array(
458 'guest' => CAP_PREVENT,
459 'student' => CAP_PREVENT,
460 'teacher' => CAP_PREVENT,
461 'editingteacher' => CAP_ALLOW,
462 'coursecreator' => CAP_ALLOW,
463 'admin' => CAP_ALLOW
464 )
465 ),
466
467 'moodle/course:view' => array(
468
469 'captype' => 'read',
470 'contextlevel' => CONTEXT_COURSE,
471 'legacy' => array(
b0f55230 472 'guest' => CAP_ALLOW,
bbbf2d40 473 'student' => CAP_ALLOW,
474 'teacher' => CAP_ALLOW,
475 'editingteacher' => CAP_ALLOW,
476 'coursecreator' => CAP_ALLOW,
477 'admin' => CAP_ALLOW
478 )
479 ),
480
1c45e42e 481 'moodle/course:viewhiddenuserfields' => array(
482
483 'captype' => 'read',
484 'contextlevel' => CONTEXT_COURSE,
485 'legacy' => array(
486 'guest' => CAP_PREVENT,
487 'student' => CAP_PREVENT,
488 'teacher' => CAP_ALLOW,
489 'editingteacher' => CAP_ALLOW,
490 'coursecreator' => CAP_ALLOW,
491 'admin' => CAP_ALLOW
492 )
493 ),
494
495 'moodle/course:viewhiddencourses' => array(
496
497 'captype' => 'read',
498 'contextlevel' => CONTEXT_COURSE,
499 'legacy' => array(
500 'guest' => CAP_PREVENT,
501 'student' => CAP_PREVENT,
502 'teacher' => CAP_PREVENT,
503 'editingteacher' => CAP_PREVENT,
504 'coursecreator' => CAP_ALLOW,
505 'admin' => CAP_ALLOW
506 )
507 ),
508
bbbf2d40 509 'moodle/course:visibility' => array(
510
511 'captype' => 'write',
512 'contextlevel' => CONTEXT_COURSE,
513 'legacy' => array(
514 'guest' => CAP_PREVENT,
515 'student' => CAP_PREVENT,
516 'teacher' => CAP_PREVENT,
517 'editingteacher' => CAP_PREVENT,
518 'coursecreator' => CAP_ALLOW,
519 'admin' => CAP_ALLOW
520 )
521 ),
522
a028c291 523 'moodle/course:managefiles' => array(
524
525 'captype' => 'write',
526 'contextlevel' => CONTEXT_COURSE,
527 'legacy' => array(
528 'guest' => CAP_PREVENT,
529 'student' => CAP_PREVENT,
530 'teacher' => CAP_PREVENT,
531 'editingteacher' => CAP_ALLOW,
532 'coursecreator' => CAP_ALLOW,
533 'admin' => CAP_ALLOW
534 )
535 ),
536
537 'moodle/course:managequestions' => array(
538
539 'captype' => 'write',
540 'contextlevel' => CONTEXT_COURSE,
541 'legacy' => array(
542 'guest' => CAP_PREVENT,
543 'student' => CAP_PREVENT,
544 'teacher' => CAP_ALLOW,
545 'editingteacher' => CAP_ALLOW,
546 'coursecreator' => CAP_ALLOW,
547 'admin' => CAP_ALLOW
548 )
549 ),
550
bbbf2d40 551 'moodle/course:manageactivities' => array(
552
553 'captype' => 'write',
554 'contextlevel' => CONTEXT_COURSE,
555 'legacy' => array(
556 'guest' => CAP_PREVENT,
557 'student' => CAP_PREVENT,
558 'teacher' => CAP_ALLOW,
559 'editingteacher' => CAP_ALLOW,
560 'coursecreator' => CAP_ALLOW,
561 'admin' => CAP_ALLOW
562 )
563 ),
564
565 'moodle/course:activityvisibility' => array(
566
567 'captype' => 'write',
568 'contextlevel' => CONTEXT_COURSE,
569 'legacy' => array(
570 'guest' => CAP_PREVENT,
571 'student' => CAP_PREVENT,
572 'teacher' => CAP_PREVENT,
573 'editingteacher' => CAP_ALLOW,
574 'coursecreator' => CAP_ALLOW,
575 'admin' => CAP_ALLOW
576 )
577 ),
578
579 'moodle/course:viewhiddenactivities' => array(
580
581 'captype' => 'write',
582 'contextlevel' => CONTEXT_COURSE,
583 'legacy' => array(
584 'guest' => CAP_PREVENT,
585 'student' => CAP_PREVENT,
586 'teacher' => CAP_ALLOW,
587 'editingteacher' => CAP_ALLOW,
588 'coursecreator' => CAP_ALLOW,
589 'admin' => CAP_ALLOW
590 )
591 ),
592
593 'moodle/course:viewparticipants' => array(
594
595 'captype' => 'read',
596 'contextlevel' => CONTEXT_COURSE,
597 'legacy' => array(
598 'guest' => CAP_PREVENT,
599 'student' => CAP_ALLOW,
600 'teacher' => CAP_ALLOW,
601 'editingteacher' => CAP_ALLOW,
602 'coursecreator' => CAP_ALLOW,
603 'admin' => CAP_ALLOW
604 )
605 ),
606
607 'moodle/course:viewscales' => array(
608
609 'captype' => 'read',
610 'contextlevel' => CONTEXT_COURSE,
611 'legacy' => array(
612 'guest' => CAP_PREVENT,
613 'student' => CAP_ALLOW,
614 'teacher' => CAP_ALLOW,
615 'editingteacher' => CAP_ALLOW,
616 'coursecreator' => CAP_ALLOW,
617 'admin' => CAP_ALLOW
618 )
619 ),
620
621 'moodle/course:managescales' => array(
622
623 'captype' => 'write',
624 'contextlevel' => CONTEXT_COURSE,
625 'legacy' => array(
626 'guest' => CAP_PREVENT,
627 'student' => CAP_PREVENT,
628 'teacher' => CAP_PREVENT,
629 'editingteacher' => CAP_ALLOW,
630 'coursecreator' => CAP_ALLOW,
631 'admin' => CAP_ALLOW
632 )
633 ),
634
635 'moodle/course:managegroups' => array(
636
637 'captype' => 'write',
638 'contextlevel' => CONTEXT_COURSE,
a028c291 639 'legacy' => array(
640 'guest' => CAP_PREVENT,
641 'student' => CAP_PREVENT,
642 'teacher' => CAP_PREVENT,
643 'editingteacher' => CAP_ALLOW,
644 'coursecreator' => CAP_ALLOW,
645 'admin' => CAP_ALLOW
646 )
647 ),
648
649 'moodle/course:reset' => array(
650
651 'captype' => 'write',
652 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 653 'legacy' => array(
654 'guest' => CAP_PREVENT,
655 'student' => CAP_PREVENT,
656 'teacher' => CAP_PREVENT,
657 'editingteacher' => CAP_ALLOW,
658 'coursecreator' => CAP_ALLOW,
659 'admin' => CAP_ALLOW
660 )
661 ),
662
663 'moodle/blog:view' => array(
664
665 'captype' => 'read',
666 'contextlevel' => CONTEXT_SYSTEM,
667 'legacy' => array(
00adf177 668 'guest' => CAP_ALLOW,
bbbf2d40 669 'student' => CAP_ALLOW,
670 'teacher' => CAP_ALLOW,
671 'editingteacher' => CAP_ALLOW,
672 'coursecreator' => CAP_ALLOW,
673 'admin' => CAP_ALLOW
674 )
675 ),
676
677 'moodle/blog:create' => array(
678
679 'captype' => 'write',
680 'contextlevel' => CONTEXT_SYSTEM,
681 'legacy' => array(
682 'guest' => CAP_PREVENT,
683 'student' => CAP_ALLOW,
684 'teacher' => CAP_ALLOW,
685 'editingteacher' => CAP_ALLOW,
686 'coursecreator' => CAP_ALLOW,
687 'admin' => CAP_ALLOW
688 )
689 ),
690
691 'moodle/blog:manageofficialtags' => array(
692
693 'captype' => 'write',
694 'contextlevel' => CONTEXT_SYSTEM,
695 'legacy' => array(
696 'guest' => CAP_PREVENT,
697 'student' => CAP_PREVENT,
698 'teacher' => CAP_PREVENT,
699 'editingteacher' => CAP_PREVENT,
700 'coursecreator' => CAP_PREVENT,
701 'admin' => CAP_ALLOW
702 )
703 ),
704
705 'moodle/blog:managepersonaltags' => array(
706
707 'captype' => 'write',
708 'contextlevel' => CONTEXT_SYSTEM,
709 'legacy' => array(
710 'guest' => CAP_PREVENT,
711 'student' => CAP_ALLOW,
712 'teacher' => CAP_ALLOW,
713 'editingteacher' => CAP_ALLOW,
714 'coursecreator' => CAP_ALLOW,
715 'admin' => CAP_ALLOW
716 )
717 ),
718
719 'moodle/blog:manageentries' => array(
720
721 'captype' => 'write',
722 'contextlevel' => CONTEXT_SYSTEM,
723 'legacy' => array(
724 'guest' => CAP_PREVENT,
725 'student' => CAP_PREVENT,
726 'teacher' => CAP_ALLOW,
727 'editingteacher' => CAP_ALLOW,
728 'coursecreator' => CAP_ALLOW,
729 'admin' => CAP_ALLOW
730 )
731 ),
732
733 'moodle/calendar:manageownentries' => array(
734
735 'captype' => 'write',
736 'contextlevel' => CONTEXT_SYSTEM,
737 'legacy' => array(
738 'guest' => CAP_PREVENT,
739 'student' => CAP_ALLOW,
740 'teacher' => CAP_ALLOW,
741 'editingteacher' => CAP_ALLOW,
742 'coursecreator' => CAP_ALLOW,
743 'admin' => CAP_ALLOW
744 )
745 ),
746
747 'moodle/calendar:manageentries' => array(
748
749 'captype' => 'write',
750 'contextlevel' => CONTEXT_SYSTEM,
751 'legacy' => array(
752 'guest' => CAP_PREVENT,
753 'student' => CAP_PREVENT,
754 'teacher' => CAP_ALLOW,
755 'editingteacher' => CAP_ALLOW,
756 'coursecreator' => CAP_ALLOW,
757 'admin' => CAP_ALLOW
758 )
77d4953e 759 ),
760
761 // The next 3 might make no sense for some roles, e.g teacher, etc.
762 // since the next level up is site. These are more for the parent role
763 'moodle/user:readuserposts' => array(
764 'captype' => 'read',
4b10f08b 765 'contextlevel' => CONTEXT_USER,
77d4953e 766 'legacy' => array(
767 'guest' => CAP_PREVENT,
768 'student' => CAP_ALLOW,
769 'teacher' => CAP_ALLOW,
770 'editingteacher' => CAP_ALLOW,
771 'coursecreator' => CAP_ALLOW,
772 'admin' => CAP_ALLOW
773 )
774 ),
bbbf2d40 775
77d4953e 776 'moodle/user:readuserblogs' => array(
777 'captype' => 'read',
4b10f08b 778 'contextlevel' => CONTEXT_USER,
77d4953e 779 'legacy' => array(
780 'guest' => CAP_PREVENT,
781 'student' => CAP_ALLOW,
782 'teacher' => CAP_ALLOW,
783 'editingteacher' => CAP_ALLOW,
784 'coursecreator' => CAP_ALLOW,
785 'admin' => CAP_ALLOW
786 )
787 ),
788
789 'moodle/user:viewuseractivitiesreport' => array(
790 'captype' => 'read',
4b10f08b 791 'contextlevel' => CONTEXT_USER,
77d4953e 792 'legacy' => array(
793 'guest' => CAP_PREVENT,
794 'student' => CAP_PREVENT,
795 'teacher' => CAP_ALLOW,
796 'editingteacher' => CAP_ALLOW,
797 'coursecreator' => CAP_ALLOW,
798 'admin' => CAP_ALLOW
799 )
945f88ca 800 ),
801
ec7a8b79 802 'moodle/user:editprofile' => array(
803 'captype' => 'read',
4b10f08b 804 'contextlevel' => CONTEXT_USER,
ec7a8b79 805 'legacy' => array(
806 'guest' => CAP_PREVENT,
807 'student' => CAP_PREVENT,
808 'teacher' => CAP_PREVENT,
809 'editingteacher' => CAP_PREVENT,
810 'coursecreator' => CAP_PREVENT,
811 'admin' => CAP_ALLOW
812 )
813 ),
814
945f88ca 815 'moodle/question:import' => array(
816 'captype' => 'write',
817 'contextlevel' => CONTEXT_COURSE,
818 'legacy' => array(
819 'guest' => CAP_PREVENT,
820 'student' => CAP_PREVENT,
821 'teacher' => CAP_PREVENT,
822 'editingteacher' => CAP_ALLOW,
823 'coursecreator' => CAP_ALLOW,
824 'admin' => CAP_ALLOW
825 )
826 ),
827
828 'moodle/question:export' => array(
829 'captype' => 'read',
830 'contextlevel' => CONTEXT_COURSE,
831 'legacy' => array(
832 'guest' => CAP_PREVENT,
833 'student' => CAP_PREVENT,
834 'teacher' => CAP_PREVENT,
835 'editingteacher' => CAP_ALLOW,
836 'coursecreator' => CAP_ALLOW,
837 'admin' => CAP_ALLOW
838 )
839 ),
840
f43ce1ad 841 'moodle/question:managecategory' => array(
945f88ca 842 'captype' => 'write',
843 'contextlevel' => CONTEXT_COURSE,
844 'legacy' => array(
845 'guest' => CAP_PREVENT,
846 'student' => CAP_PREVENT,
847 'teacher' => CAP_PREVENT,
848 'editingteacher' => CAP_ALLOW,
849 'coursecreator' => CAP_ALLOW,
850 'admin' => CAP_ALLOW
851 )
852 ),
853
854 'moodle/question:manage' => array(
855 'captype' => 'write',
856 'contextlevel' => CONTEXT_COURSE,
857 'legacy' => array(
858 'guest' => CAP_PREVENT,
859 'student' => CAP_PREVENT,
860 'teacher' => CAP_PREVENT,
861 'editingteacher' => CAP_ALLOW,
862 'coursecreator' => CAP_ALLOW,
863 'admin' => CAP_ALLOW
864 )
7191a1fa 865 ),
866
867 'moodle/site:doclinks' => array(
868 'captype' => 'read',
869 'contextlevel' => CONTEXT_SYSTEM,
870 'legacy' => array(
871 'guest' => CAP_PREVENT,
872 'student' => CAP_PREVENT,
873 'teacher' => CAP_ALLOW,
874 'editingteacher' => CAP_ALLOW,
875 'coursecreator' => CAP_ALLOW,
876 'admin' => CAP_ALLOW
877 )
3924b988 878 ),
879
880 'moodle/course:sectionvisibility' => array(
881 'captype' => 'write',
882 'contextlevel' => CONTEXT_COURSE,
883 'legacy' => array(
884 'guest' => CAP_PREVENT,
885 'student' => CAP_PREVENT,
886 'teacher' => CAP_PREVENT,
887 'editingteacher' => CAP_ALLOW,
888 'coursecreator' => CAP_ALLOW,
889 'admin' => CAP_ALLOW
890 )
891 ),
892
893 'moodle/course:viewhiddensections' => array(
894 'captype' => 'write',
895 'contextlevel' => CONTEXT_COURSE,
896 'legacy' => array(
897 'guest' => CAP_PREVENT,
898 'student' => CAP_PREVENT,
899 'teacher' => CAP_PREVENT,
900 'editingteacher' => CAP_ALLOW,
901 'coursecreator' => CAP_ALLOW,
902 'admin' => CAP_ALLOW
903 )
904 ),
905
906 'moodle/course:setcurrentsection' => array(
907 'captype' => 'write',
908 'contextlevel' => CONTEXT_COURSE,
909 'legacy' => array(
910 'guest' => CAP_PREVENT,
911 'student' => CAP_PREVENT,
912 'teacher' => CAP_PREVENT,
913 'editingteacher' => CAP_ALLOW,
914 'coursecreator' => CAP_ALLOW,
915 'admin' => CAP_ALLOW
916 )
917 ),
918
919 'moodle/course:viewcoursegrades' => array(
920 'captype' => 'read',
921 'contextlevel' => CONTEXT_COURSE,
922 'legacy' => array(
923 'guest' => CAP_PREVENT,
924 'student' => CAP_PREVENT,
925 'teacher' => CAP_ALLOW,
926 'editingteacher' => CAP_ALLOW,
927 'coursecreator' => CAP_ALLOW,
928 'admin' => CAP_ALLOW
929 )
930 ),
931
932 'moodle/course:managegrades' => array(
933 'captype' => 'write',
934 'contextlevel' => CONTEXT_COURSE,
935 'legacy' => array(
936 'guest' => CAP_PREVENT,
937 'student' => CAP_PREVENT,
938 'teacher' => CAP_PREVENT,
939 'editingteacher' => CAP_ALLOW,
940 'coursecreator' => CAP_ALLOW,
941 'admin' => CAP_ALLOW
942 )
943 ),
944
945 'moodle/user:viewusergrades' => array(
946 'captype' => 'write',
947 'contextlevel' => CONTEXT_COURSE,
948 'legacy' => array(
949 'guest' => CAP_PREVENT,
950 'student' => CAP_ALLOW,
951 'teacher' => CAP_ALLOW,
952 'editingteacher' => CAP_ALLOW,
953 'coursecreator' => CAP_ALLOW,
954 'admin' => CAP_ALLOW
955 )
77d4953e 956 )
f43ce1ad 957
bbbf2d40 958);
959
960?>