Initial RenameTable caller to generators. Not ended by I needed it in CVS now.
[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
91 'moodle/site:import' => array(
92
93 'captype' => 'write',
94 'contextlevel' => CONTEXT_SYSTEM,
95 'legacy' => array(
96 'guest' => CAP_PREVENT,
97 'student' => CAP_PREVENT,
a028c291 98 'teacher' => CAP_ALLOW,
99 'editingteacher' => CAP_ALLOW,
100 'coursecreator' => CAP_ALLOW,
bbbf2d40 101 'admin' => CAP_ALLOW
102 )
103 ),
104
105 'moodle/site:backup' => 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
119 'moodle/site:restore' => array(
120
121 'captype' => 'write',
122 'contextlevel' => CONTEXT_SYSTEM,
123 'legacy' => array(
124 'guest' => CAP_PREVENT,
125 'student' => CAP_PREVENT,
126 'teacher' => CAP_PREVENT,
127 'editingteacher' => CAP_PREVENT,
128 'coursecreator' => CAP_PREVENT,
129 'admin' => CAP_ALLOW
130 )
131 ),
132
133 'moodle/site:manageblocks' => 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
27950688 147 'moodle/site:accessallgroups' => array(
148
149 'captype' => 'read',
150 'contextlevel' => CONTEXT_SYSTEM,
151 'legacy' => array(
152 'guest' => CAP_PREVENT,
153 'student' => CAP_PREVENT,
154 'teacher' => CAP_ALLOW,
155 'editingteacher' => CAP_ALLOW,
156 'coursecreator' => CAP_ALLOW,
157 'admin' => CAP_ALLOW
158 )
159 ),
160
53d7785b 161 'moodle/site:viewfullnames' => array(
162
163 'captype' => 'read',
164 'contextlevel' => CONTEXT_SYSTEM,
165 'legacy' => array(
166 'guest' => CAP_PREVENT,
167 'student' => CAP_PREVENT,
168 'teacher' => CAP_ALLOW,
169 'editingteacher' => CAP_ALLOW,
170 'coursecreator' => CAP_ALLOW,
171 'admin' => CAP_ALLOW
172 )
173 ),
174
a028c291 175 'moodle/site:viewreports' => array(
176
177 'captype' => 'read',
77d4953e 178 'contextlevel' => CONTEXT_SYSTEM,
a028c291 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
7d8a3cb0 189 'moodle/site:trustcontent' => array(
190
191 'captype' => 'write',
192 'contextlevel' => CONTEXT_SYSTEM,
193 'legacy' => array(
194 'guest' => CAP_PREVENT,
195 'student' => CAP_PREVENT,
196 'teacher' => CAP_PREVENT,
197 'editingteacher' => CAP_ALLOW,
198 'coursecreator' => CAP_ALLOW,
199 'admin' => CAP_ALLOW
200 )
201 ),
202
bbbf2d40 203 'moodle/user:create' => array(
204
205 'captype' => 'write',
206 'contextlevel' => CONTEXT_SYSTEM,
207 'legacy' => array(
208 'guest' => CAP_PREVENT,
209 'student' => CAP_PREVENT,
210 'teacher' => CAP_PREVENT,
211 'editingteacher' => CAP_PREVENT,
212 'coursecreator' => CAP_PREVENT,
213 'admin' => CAP_ALLOW
214 )
215 ),
216
217 'moodle/user:delete' => 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_PREVENT,
226 'coursecreator' => CAP_PREVENT,
227 'admin' => CAP_ALLOW
228 )
229 ),
230
231 'moodle/user:update' => 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:viewdetails' => array(
246
247 'captype' => 'write',
248 'contextlevel' => CONTEXT_SYSTEM,
249 'legacy' => array(
250 'guest' => CAP_PREVENT,
251 'student' => CAP_ALLOW,
252 'teacher' => CAP_ALLOW,
253 'editingteacher' => CAP_ALLOW,
254 'coursecreator' => CAP_ALLOW,
255 'admin' => CAP_ALLOW
256 )
257 ),
258
259 'moodle/role:assign' => array(
260
261 'captype' => 'write',
262 'contextlevel' => CONTEXT_SYSTEM,
263 'legacy' => array(
264 'guest' => CAP_PREVENT,
68c52526 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/role:override' => array(
274
275 'captype' => 'write',
276 'contextlevel' => CONTEXT_SYSTEM,
277 'legacy' => array(
278 'guest' => CAP_PREVENT,
bbbf2d40 279 'student' => CAP_PREVENT,
280 'teacher' => CAP_PREVENT,
281 'editingteacher' => CAP_PREVENT,
282 'coursecreator' => CAP_PREVENT,
283 'admin' => CAP_ALLOW
284 )
285 ),
286
287 'moodle/role:manage' => array(
288
289 'captype' => 'write',
290 'contextlevel' => CONTEXT_SYSTEM,
291 'legacy' => array(
292 'guest' => CAP_PREVENT,
293 'student' => CAP_PREVENT,
294 'teacher' => CAP_PREVENT,
295 'editingteacher' => CAP_PREVENT,
296 'coursecreator' => CAP_PREVENT,
297 'admin' => CAP_ALLOW
298 )
299 ),
300
301 'moodle/category:create' => array(
302
303 'captype' => 'write',
304 'contextlevel' => CONTEXT_COURSECAT,
305 'legacy' => array(
306 'guest' => CAP_PREVENT,
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/category:delete' => array(
316
317 'captype' => 'write',
318 'contextlevel' => CONTEXT_COURSECAT,
319 'legacy' => array(
320 'guest' => CAP_PREVENT,
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/category:update' => array(
330
331 'captype' => 'write',
332 'contextlevel' => CONTEXT_COURSECAT,
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 ),
342
343 'moodle/category:visibility' => array(
344
345 'captype' => 'write',
346 'contextlevel' => CONTEXT_COURSECAT,
347 'legacy' => array(
348 'guest' => CAP_PREVENT,
349 'student' => CAP_PREVENT,
350 'teacher' => CAP_PREVENT,
351 'editingteacher' => CAP_PREVENT,
352 'coursecreator' => CAP_PREVENT,
353 'admin' => CAP_ALLOW
354 )
355 ),
356
357 'moodle/course:create' => array(
358
359 'captype' => 'write',
360 'contextlevel' => CONTEXT_COURSE,
361 'legacy' => array(
362 'guest' => CAP_PREVENT,
363 'student' => CAP_PREVENT,
364 'teacher' => CAP_PREVENT,
365 'editingteacher' => CAP_PREVENT,
366 'coursecreator' => CAP_PREVENT,
367 'admin' => CAP_ALLOW
368 )
369 ),
370
371 'moodle/course:delete' => array(
372
373 'captype' => 'write',
374 'contextlevel' => CONTEXT_COURSE,
375 'legacy' => array(
376 'guest' => CAP_PREVENT,
377 'student' => CAP_PREVENT,
378 'teacher' => CAP_PREVENT,
379 'editingteacher' => CAP_PREVENT,
380 'coursecreator' => CAP_PREVENT,
381 'admin' => CAP_ALLOW
382 )
383 ),
384
385 'moodle/course:update' => array(
386
387 'captype' => 'write',
388 'contextlevel' => CONTEXT_COURSE,
389 'legacy' => array(
390 'guest' => CAP_PREVENT,
391 'student' => CAP_PREVENT,
392 'teacher' => CAP_PREVENT,
393 'editingteacher' => CAP_ALLOW,
394 'coursecreator' => CAP_ALLOW,
395 'admin' => CAP_ALLOW
396 )
397 ),
398
399 'moodle/course:view' => array(
400
401 'captype' => 'read',
402 'contextlevel' => CONTEXT_COURSE,
403 'legacy' => array(
404 'guest' => CAP_PREVENT,
405 'student' => CAP_ALLOW,
406 'teacher' => CAP_ALLOW,
407 'editingteacher' => CAP_ALLOW,
408 'coursecreator' => CAP_ALLOW,
409 'admin' => CAP_ALLOW
410 )
411 ),
412
413 'moodle/course:visibility' => array(
414
415 'captype' => 'write',
416 'contextlevel' => CONTEXT_COURSE,
417 'legacy' => array(
418 'guest' => CAP_PREVENT,
419 'student' => CAP_PREVENT,
420 'teacher' => CAP_PREVENT,
421 'editingteacher' => CAP_PREVENT,
422 'coursecreator' => CAP_ALLOW,
423 'admin' => CAP_ALLOW
424 )
425 ),
426
a028c291 427 'moodle/course:managefiles' => array(
428
429 'captype' => 'write',
430 'contextlevel' => CONTEXT_COURSE,
431 'legacy' => array(
432 'guest' => CAP_PREVENT,
433 'student' => CAP_PREVENT,
434 'teacher' => CAP_PREVENT,
435 'editingteacher' => CAP_ALLOW,
436 'coursecreator' => CAP_ALLOW,
437 'admin' => CAP_ALLOW
438 )
439 ),
440
441 'moodle/course:managequestions' => array(
442
443 'captype' => 'write',
444 'contextlevel' => CONTEXT_COURSE,
445 'legacy' => array(
446 'guest' => CAP_PREVENT,
447 'student' => CAP_PREVENT,
448 'teacher' => CAP_ALLOW,
449 'editingteacher' => CAP_ALLOW,
450 'coursecreator' => CAP_ALLOW,
451 'admin' => CAP_ALLOW
452 )
453 ),
454
bbbf2d40 455 'moodle/course:manageactivities' => array(
456
457 'captype' => 'write',
458 'contextlevel' => CONTEXT_COURSE,
459 'legacy' => array(
460 'guest' => CAP_PREVENT,
461 'student' => CAP_PREVENT,
462 'teacher' => CAP_ALLOW,
463 'editingteacher' => CAP_ALLOW,
464 'coursecreator' => CAP_ALLOW,
465 'admin' => CAP_ALLOW
466 )
467 ),
468
469 'moodle/course:activityvisibility' => array(
470
471 'captype' => 'write',
472 'contextlevel' => CONTEXT_COURSE,
473 'legacy' => array(
474 'guest' => CAP_PREVENT,
475 'student' => CAP_PREVENT,
476 'teacher' => CAP_PREVENT,
477 'editingteacher' => CAP_ALLOW,
478 'coursecreator' => CAP_ALLOW,
479 'admin' => CAP_ALLOW
480 )
481 ),
482
483 'moodle/course:viewhiddenactivities' => array(
484
485 'captype' => 'write',
486 'contextlevel' => CONTEXT_COURSE,
487 'legacy' => array(
488 'guest' => CAP_PREVENT,
489 'student' => CAP_PREVENT,
490 'teacher' => CAP_ALLOW,
491 'editingteacher' => CAP_ALLOW,
492 'coursecreator' => CAP_ALLOW,
493 'admin' => CAP_ALLOW
494 )
495 ),
496
497 'moodle/course:viewparticipants' => array(
498
499 'captype' => 'read',
500 'contextlevel' => CONTEXT_COURSE,
501 'legacy' => array(
502 'guest' => CAP_PREVENT,
503 'student' => CAP_ALLOW,
504 'teacher' => CAP_ALLOW,
505 'editingteacher' => CAP_ALLOW,
506 'coursecreator' => CAP_ALLOW,
507 'admin' => CAP_ALLOW
508 )
509 ),
510
511 'moodle/course:viewscales' => array(
512
513 'captype' => 'read',
514 'contextlevel' => CONTEXT_COURSE,
515 'legacy' => array(
516 'guest' => CAP_PREVENT,
517 'student' => CAP_ALLOW,
518 'teacher' => CAP_ALLOW,
519 'editingteacher' => CAP_ALLOW,
520 'coursecreator' => CAP_ALLOW,
521 'admin' => CAP_ALLOW
522 )
523 ),
524
525 'moodle/course:managescales' => array(
526
527 'captype' => 'write',
528 'contextlevel' => CONTEXT_COURSE,
529 'legacy' => array(
530 'guest' => CAP_PREVENT,
531 'student' => CAP_PREVENT,
532 'teacher' => CAP_PREVENT,
533 'editingteacher' => CAP_ALLOW,
534 'coursecreator' => CAP_ALLOW,
535 'admin' => CAP_ALLOW
536 )
537 ),
538
539 'moodle/course:managegroups' => array(
540
541 'captype' => 'write',
542 'contextlevel' => CONTEXT_COURSE,
a028c291 543 'legacy' => array(
544 'guest' => CAP_PREVENT,
545 'student' => CAP_PREVENT,
546 'teacher' => CAP_PREVENT,
547 'editingteacher' => CAP_ALLOW,
548 'coursecreator' => CAP_ALLOW,
549 'admin' => CAP_ALLOW
550 )
551 ),
552
553 'moodle/course:reset' => array(
554
555 'captype' => 'write',
556 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 557 'legacy' => array(
558 'guest' => CAP_PREVENT,
559 'student' => CAP_PREVENT,
560 'teacher' => CAP_PREVENT,
561 'editingteacher' => CAP_ALLOW,
562 'coursecreator' => CAP_ALLOW,
563 'admin' => CAP_ALLOW
564 )
565 ),
566
567 'moodle/blog:view' => array(
568
569 'captype' => 'read',
570 'contextlevel' => CONTEXT_SYSTEM,
571 'legacy' => array(
572 'guest' => CAP_PREVENT,
573 'student' => CAP_ALLOW,
574 'teacher' => CAP_ALLOW,
575 'editingteacher' => CAP_ALLOW,
576 'coursecreator' => CAP_ALLOW,
577 'admin' => CAP_ALLOW
578 )
579 ),
580
581 'moodle/blog:create' => array(
582
583 'captype' => 'write',
584 'contextlevel' => CONTEXT_SYSTEM,
585 'legacy' => array(
586 'guest' => CAP_PREVENT,
587 'student' => CAP_ALLOW,
588 'teacher' => CAP_ALLOW,
589 'editingteacher' => CAP_ALLOW,
590 'coursecreator' => CAP_ALLOW,
591 'admin' => CAP_ALLOW
592 )
593 ),
594
595 'moodle/blog:manageofficialtags' => array(
596
597 'captype' => 'write',
598 'contextlevel' => CONTEXT_SYSTEM,
599 'legacy' => array(
600 'guest' => CAP_PREVENT,
601 'student' => CAP_PREVENT,
602 'teacher' => CAP_PREVENT,
603 'editingteacher' => CAP_PREVENT,
604 'coursecreator' => CAP_PREVENT,
605 'admin' => CAP_ALLOW
606 )
607 ),
608
609 'moodle/blog:managepersonaltags' => array(
610
611 'captype' => 'write',
612 'contextlevel' => CONTEXT_SYSTEM,
613 'legacy' => array(
614 'guest' => CAP_PREVENT,
615 'student' => CAP_ALLOW,
616 'teacher' => CAP_ALLOW,
617 'editingteacher' => CAP_ALLOW,
618 'coursecreator' => CAP_ALLOW,
619 'admin' => CAP_ALLOW
620 )
621 ),
622
623 'moodle/blog:manageentries' => array(
624
625 'captype' => 'write',
626 'contextlevel' => CONTEXT_SYSTEM,
627 'legacy' => array(
628 'guest' => CAP_PREVENT,
629 'student' => CAP_PREVENT,
630 'teacher' => CAP_ALLOW,
631 'editingteacher' => CAP_ALLOW,
632 'coursecreator' => CAP_ALLOW,
633 'admin' => CAP_ALLOW
634 )
635 ),
636
637 'moodle/calendar:manageownentries' => array(
638
639 'captype' => 'write',
640 'contextlevel' => CONTEXT_SYSTEM,
641 'legacy' => array(
642 'guest' => CAP_PREVENT,
643 'student' => CAP_ALLOW,
644 'teacher' => CAP_ALLOW,
645 'editingteacher' => CAP_ALLOW,
646 'coursecreator' => CAP_ALLOW,
647 'admin' => CAP_ALLOW
648 )
649 ),
650
651 'moodle/calendar:manageentries' => array(
652
653 'captype' => 'write',
654 'contextlevel' => CONTEXT_SYSTEM,
655 'legacy' => array(
656 'guest' => CAP_PREVENT,
657 'student' => CAP_PREVENT,
658 'teacher' => CAP_ALLOW,
659 'editingteacher' => CAP_ALLOW,
660 'coursecreator' => CAP_ALLOW,
661 'admin' => CAP_ALLOW
662 )
77d4953e 663 ),
664
665 // The next 3 might make no sense for some roles, e.g teacher, etc.
666 // since the next level up is site. These are more for the parent role
667 'moodle/user:readuserposts' => array(
668 'captype' => 'read',
669 'contextlevel' => CONTEXT_USERID,
670 'legacy' => array(
671 'guest' => CAP_PREVENT,
672 'student' => CAP_ALLOW,
673 'teacher' => CAP_ALLOW,
674 'editingteacher' => CAP_ALLOW,
675 'coursecreator' => CAP_ALLOW,
676 'admin' => CAP_ALLOW
677 )
678 ),
bbbf2d40 679
77d4953e 680 'moodle/user:readuserblogs' => array(
681 'captype' => 'read',
682 'contextlevel' => CONTEXT_USERID,
683 'legacy' => array(
684 'guest' => CAP_PREVENT,
685 'student' => CAP_ALLOW,
686 'teacher' => CAP_ALLOW,
687 'editingteacher' => CAP_ALLOW,
688 'coursecreator' => CAP_ALLOW,
689 'admin' => CAP_ALLOW
690 )
691 ),
692
693 'moodle/user:viewuseractivitiesreport' => array(
694 'captype' => 'read',
695 'contextlevel' => CONTEXT_USERID,
696 'legacy' => array(
697 'guest' => CAP_PREVENT,
698 'student' => CAP_PREVENT,
699 'teacher' => CAP_ALLOW,
700 'editingteacher' => CAP_ALLOW,
701 'coursecreator' => CAP_ALLOW,
702 'admin' => CAP_ALLOW
703 )
945f88ca 704 ),
705
706 'moodle/question:import' => array(
707 'captype' => 'write',
708 'contextlevel' => CONTEXT_COURSE,
709 'legacy' => array(
710 'guest' => CAP_PREVENT,
711 'student' => CAP_PREVENT,
712 'teacher' => CAP_PREVENT,
713 'editingteacher' => CAP_ALLOW,
714 'coursecreator' => CAP_ALLOW,
715 'admin' => CAP_ALLOW
716 )
717 ),
718
719 'moodle/question:export' => array(
720 'captype' => 'read',
721 'contextlevel' => CONTEXT_COURSE,
722 'legacy' => array(
723 'guest' => CAP_PREVENT,
724 'student' => CAP_PREVENT,
725 'teacher' => CAP_PREVENT,
726 'editingteacher' => CAP_ALLOW,
727 'coursecreator' => CAP_ALLOW,
728 'admin' => CAP_ALLOW
729 )
730 ),
731
732 'moodle/question:managecateory' => array(
733 'captype' => 'write',
734 'contextlevel' => CONTEXT_COURSE,
735 'legacy' => array(
736 'guest' => CAP_PREVENT,
737 'student' => CAP_PREVENT,
738 'teacher' => CAP_PREVENT,
739 'editingteacher' => CAP_ALLOW,
740 'coursecreator' => CAP_ALLOW,
741 'admin' => CAP_ALLOW
742 )
743 ),
744
745 'moodle/question:manage' => array(
746 'captype' => 'write',
747 'contextlevel' => CONTEXT_COURSE,
748 'legacy' => array(
749 'guest' => CAP_PREVENT,
750 'student' => CAP_PREVENT,
751 'teacher' => CAP_PREVENT,
752 'editingteacher' => CAP_ALLOW,
753 'coursecreator' => CAP_ALLOW,
754 'admin' => CAP_ALLOW
755 )
7191a1fa 756 ),
757
758 'moodle/site:doclinks' => array(
759 'captype' => 'read',
760 'contextlevel' => CONTEXT_SYSTEM,
761 'legacy' => array(
762 'guest' => CAP_PREVENT,
763 'student' => CAP_PREVENT,
764 'teacher' => CAP_ALLOW,
765 'editingteacher' => CAP_ALLOW,
766 'coursecreator' => CAP_ALLOW,
767 'admin' => CAP_ALLOW
768 )
3924b988 769 ),
770
771 'moodle/course:sectionvisibility' => array(
772 'captype' => 'write',
773 'contextlevel' => CONTEXT_COURSE,
774 'legacy' => array(
775 'guest' => CAP_PREVENT,
776 'student' => CAP_PREVENT,
777 'teacher' => CAP_PREVENT,
778 'editingteacher' => CAP_ALLOW,
779 'coursecreator' => CAP_ALLOW,
780 'admin' => CAP_ALLOW
781 )
782 ),
783
784 'moodle/course:viewhiddensections' => array(
785 'captype' => 'write',
786 'contextlevel' => CONTEXT_COURSE,
787 'legacy' => array(
788 'guest' => CAP_PREVENT,
789 'student' => CAP_PREVENT,
790 'teacher' => CAP_PREVENT,
791 'editingteacher' => CAP_ALLOW,
792 'coursecreator' => CAP_ALLOW,
793 'admin' => CAP_ALLOW
794 )
795 ),
796
797 'moodle/course:setcurrentsection' => array(
798 'captype' => 'write',
799 'contextlevel' => CONTEXT_COURSE,
800 'legacy' => array(
801 'guest' => CAP_PREVENT,
802 'student' => CAP_PREVENT,
803 'teacher' => CAP_PREVENT,
804 'editingteacher' => CAP_ALLOW,
805 'coursecreator' => CAP_ALLOW,
806 'admin' => CAP_ALLOW
807 )
808 ),
809
810 'moodle/course:viewcoursegrades' => array(
811 'captype' => 'read',
812 'contextlevel' => CONTEXT_COURSE,
813 'legacy' => array(
814 'guest' => CAP_PREVENT,
815 'student' => CAP_PREVENT,
816 'teacher' => CAP_ALLOW,
817 'editingteacher' => CAP_ALLOW,
818 'coursecreator' => CAP_ALLOW,
819 'admin' => CAP_ALLOW
820 )
821 ),
822
823 'moodle/course:managegrades' => array(
824 'captype' => 'write',
825 'contextlevel' => CONTEXT_COURSE,
826 'legacy' => array(
827 'guest' => CAP_PREVENT,
828 'student' => CAP_PREVENT,
829 'teacher' => CAP_PREVENT,
830 'editingteacher' => CAP_ALLOW,
831 'coursecreator' => CAP_ALLOW,
832 'admin' => CAP_ALLOW
833 )
834 ),
835
836 'moodle/user:viewusergrades' => array(
837 'captype' => 'write',
838 'contextlevel' => CONTEXT_COURSE,
839 'legacy' => array(
840 'guest' => CAP_PREVENT,
841 'student' => CAP_ALLOW,
842 'teacher' => CAP_ALLOW,
843 'editingteacher' => CAP_ALLOW,
844 'coursecreator' => CAP_ALLOW,
845 'admin' => CAP_ALLOW
846 )
77d4953e 847 )
bbbf2d40 848);
849
850?>