Added moodle/role:unassignself which replaces $CFG->allowunenroll
[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 ),
f43ce1ad 300
301 'moodle/role:unassignself' => array(
302 'captype' => 'write',
303 'contextlevel' => CONTEXT_SYSTEM,
304 'legacy' => array(
305 'guest' => CAP_PREVENT,
306 'student' => (empty($CFG->allowunenrol)) ? CAP_PREVENT : CAP_ALLOW,
307 'teacher' => CAP_ALLOW,
308 'editingteacher' => CAP_ALLOW,
309 'coursecreator' => CAP_ALLOW,
310 'admin' => CAP_ALLOW
311 )
312 ),
bbbf2d40 313
314 'moodle/category:create' => array(
315
316 'captype' => 'write',
317 'contextlevel' => CONTEXT_COURSECAT,
318 'legacy' => array(
319 'guest' => CAP_PREVENT,
320 'student' => CAP_PREVENT,
321 'teacher' => CAP_PREVENT,
322 'editingteacher' => CAP_PREVENT,
323 'coursecreator' => CAP_PREVENT,
324 'admin' => CAP_ALLOW
325 )
326 ),
327
328 'moodle/category:delete' => array(
329
330 'captype' => 'write',
331 'contextlevel' => CONTEXT_COURSECAT,
332 'legacy' => array(
333 'guest' => CAP_PREVENT,
334 'student' => CAP_PREVENT,
335 'teacher' => CAP_PREVENT,
336 'editingteacher' => CAP_PREVENT,
337 'coursecreator' => CAP_PREVENT,
338 'admin' => CAP_ALLOW
339 )
340 ),
341
342 'moodle/category:update' => array(
343
344 'captype' => 'write',
345 'contextlevel' => CONTEXT_COURSECAT,
346 'legacy' => array(
347 'guest' => CAP_PREVENT,
348 'student' => CAP_PREVENT,
349 'teacher' => CAP_PREVENT,
350 'editingteacher' => CAP_PREVENT,
351 'coursecreator' => CAP_PREVENT,
352 'admin' => CAP_ALLOW
353 )
354 ),
355
356 'moodle/category:visibility' => array(
357
358 'captype' => 'write',
359 'contextlevel' => CONTEXT_COURSECAT,
360 'legacy' => array(
361 'guest' => CAP_PREVENT,
362 'student' => CAP_PREVENT,
363 'teacher' => CAP_PREVENT,
364 'editingteacher' => CAP_PREVENT,
365 'coursecreator' => CAP_PREVENT,
366 'admin' => CAP_ALLOW
367 )
368 ),
369
370 'moodle/course:create' => array(
371
372 'captype' => 'write',
373 'contextlevel' => CONTEXT_COURSE,
374 'legacy' => array(
375 'guest' => CAP_PREVENT,
376 'student' => CAP_PREVENT,
377 'teacher' => CAP_PREVENT,
378 'editingteacher' => CAP_PREVENT,
379 'coursecreator' => CAP_PREVENT,
380 'admin' => CAP_ALLOW
381 )
382 ),
383
384 'moodle/course:delete' => array(
385
386 'captype' => 'write',
387 'contextlevel' => CONTEXT_COURSE,
388 'legacy' => array(
389 'guest' => CAP_PREVENT,
390 'student' => CAP_PREVENT,
391 'teacher' => CAP_PREVENT,
392 'editingteacher' => CAP_PREVENT,
393 'coursecreator' => CAP_PREVENT,
394 'admin' => CAP_ALLOW
395 )
396 ),
397
398 'moodle/course:update' => array(
399
400 'captype' => 'write',
401 'contextlevel' => CONTEXT_COURSE,
402 'legacy' => array(
403 'guest' => CAP_PREVENT,
404 'student' => CAP_PREVENT,
405 'teacher' => CAP_PREVENT,
406 'editingteacher' => CAP_ALLOW,
407 'coursecreator' => CAP_ALLOW,
408 'admin' => CAP_ALLOW
409 )
410 ),
411
412 'moodle/course:view' => array(
413
414 'captype' => 'read',
415 'contextlevel' => CONTEXT_COURSE,
416 'legacy' => array(
417 'guest' => CAP_PREVENT,
418 'student' => CAP_ALLOW,
419 'teacher' => CAP_ALLOW,
420 'editingteacher' => CAP_ALLOW,
421 'coursecreator' => CAP_ALLOW,
422 'admin' => CAP_ALLOW
423 )
424 ),
425
426 'moodle/course:visibility' => array(
427
428 'captype' => 'write',
429 'contextlevel' => CONTEXT_COURSE,
430 'legacy' => array(
431 'guest' => CAP_PREVENT,
432 'student' => CAP_PREVENT,
433 'teacher' => CAP_PREVENT,
434 'editingteacher' => CAP_PREVENT,
435 'coursecreator' => CAP_ALLOW,
436 'admin' => CAP_ALLOW
437 )
438 ),
439
a028c291 440 'moodle/course:managefiles' => array(
441
442 'captype' => 'write',
443 'contextlevel' => CONTEXT_COURSE,
444 'legacy' => array(
445 'guest' => CAP_PREVENT,
446 'student' => CAP_PREVENT,
447 'teacher' => CAP_PREVENT,
448 'editingteacher' => CAP_ALLOW,
449 'coursecreator' => CAP_ALLOW,
450 'admin' => CAP_ALLOW
451 )
452 ),
453
454 'moodle/course:managequestions' => array(
455
456 'captype' => 'write',
457 'contextlevel' => CONTEXT_COURSE,
458 'legacy' => array(
459 'guest' => CAP_PREVENT,
460 'student' => CAP_PREVENT,
461 'teacher' => CAP_ALLOW,
462 'editingteacher' => CAP_ALLOW,
463 'coursecreator' => CAP_ALLOW,
464 'admin' => CAP_ALLOW
465 )
466 ),
467
bbbf2d40 468 'moodle/course:manageactivities' => array(
469
470 'captype' => 'write',
471 'contextlevel' => CONTEXT_COURSE,
472 'legacy' => array(
473 'guest' => CAP_PREVENT,
474 'student' => CAP_PREVENT,
475 'teacher' => CAP_ALLOW,
476 'editingteacher' => CAP_ALLOW,
477 'coursecreator' => CAP_ALLOW,
478 'admin' => CAP_ALLOW
479 )
480 ),
481
482 'moodle/course:activityvisibility' => array(
483
484 'captype' => 'write',
485 'contextlevel' => CONTEXT_COURSE,
486 'legacy' => array(
487 'guest' => CAP_PREVENT,
488 'student' => CAP_PREVENT,
489 'teacher' => CAP_PREVENT,
490 'editingteacher' => CAP_ALLOW,
491 'coursecreator' => CAP_ALLOW,
492 'admin' => CAP_ALLOW
493 )
494 ),
495
496 'moodle/course:viewhiddenactivities' => array(
497
498 'captype' => 'write',
499 'contextlevel' => CONTEXT_COURSE,
500 'legacy' => array(
501 'guest' => CAP_PREVENT,
502 'student' => CAP_PREVENT,
503 'teacher' => CAP_ALLOW,
504 'editingteacher' => CAP_ALLOW,
505 'coursecreator' => CAP_ALLOW,
506 'admin' => CAP_ALLOW
507 )
508 ),
509
510 'moodle/course:viewparticipants' => array(
511
512 'captype' => 'read',
513 'contextlevel' => CONTEXT_COURSE,
514 'legacy' => array(
515 'guest' => CAP_PREVENT,
516 'student' => CAP_ALLOW,
517 'teacher' => CAP_ALLOW,
518 'editingteacher' => CAP_ALLOW,
519 'coursecreator' => CAP_ALLOW,
520 'admin' => CAP_ALLOW
521 )
522 ),
523
524 'moodle/course:viewscales' => array(
525
526 'captype' => 'read',
527 'contextlevel' => CONTEXT_COURSE,
528 'legacy' => array(
529 'guest' => CAP_PREVENT,
530 'student' => CAP_ALLOW,
531 'teacher' => CAP_ALLOW,
532 'editingteacher' => CAP_ALLOW,
533 'coursecreator' => CAP_ALLOW,
534 'admin' => CAP_ALLOW
535 )
536 ),
537
538 'moodle/course:managescales' => array(
539
540 'captype' => 'write',
541 'contextlevel' => CONTEXT_COURSE,
542 'legacy' => array(
543 'guest' => CAP_PREVENT,
544 'student' => CAP_PREVENT,
545 'teacher' => CAP_PREVENT,
546 'editingteacher' => CAP_ALLOW,
547 'coursecreator' => CAP_ALLOW,
548 'admin' => CAP_ALLOW
549 )
550 ),
551
552 'moodle/course:managegroups' => array(
553
554 'captype' => 'write',
555 'contextlevel' => CONTEXT_COURSE,
a028c291 556 'legacy' => array(
557 'guest' => CAP_PREVENT,
558 'student' => CAP_PREVENT,
559 'teacher' => CAP_PREVENT,
560 'editingteacher' => CAP_ALLOW,
561 'coursecreator' => CAP_ALLOW,
562 'admin' => CAP_ALLOW
563 )
564 ),
565
566 'moodle/course:reset' => array(
567
568 'captype' => 'write',
569 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 570 'legacy' => array(
571 'guest' => CAP_PREVENT,
572 'student' => CAP_PREVENT,
573 'teacher' => CAP_PREVENT,
574 'editingteacher' => CAP_ALLOW,
575 'coursecreator' => CAP_ALLOW,
576 'admin' => CAP_ALLOW
577 )
578 ),
579
580 'moodle/blog:view' => array(
581
582 'captype' => 'read',
583 'contextlevel' => CONTEXT_SYSTEM,
584 'legacy' => array(
585 'guest' => CAP_PREVENT,
586 'student' => CAP_ALLOW,
587 'teacher' => CAP_ALLOW,
588 'editingteacher' => CAP_ALLOW,
589 'coursecreator' => CAP_ALLOW,
590 'admin' => CAP_ALLOW
591 )
592 ),
593
594 'moodle/blog:create' => array(
595
596 'captype' => 'write',
597 'contextlevel' => CONTEXT_SYSTEM,
598 'legacy' => array(
599 'guest' => CAP_PREVENT,
600 'student' => CAP_ALLOW,
601 'teacher' => CAP_ALLOW,
602 'editingteacher' => CAP_ALLOW,
603 'coursecreator' => CAP_ALLOW,
604 'admin' => CAP_ALLOW
605 )
606 ),
607
608 'moodle/blog:manageofficialtags' => array(
609
610 'captype' => 'write',
611 'contextlevel' => CONTEXT_SYSTEM,
612 'legacy' => array(
613 'guest' => CAP_PREVENT,
614 'student' => CAP_PREVENT,
615 'teacher' => CAP_PREVENT,
616 'editingteacher' => CAP_PREVENT,
617 'coursecreator' => CAP_PREVENT,
618 'admin' => CAP_ALLOW
619 )
620 ),
621
622 'moodle/blog:managepersonaltags' => array(
623
624 'captype' => 'write',
625 'contextlevel' => CONTEXT_SYSTEM,
626 'legacy' => array(
627 'guest' => CAP_PREVENT,
628 'student' => CAP_ALLOW,
629 'teacher' => CAP_ALLOW,
630 'editingteacher' => CAP_ALLOW,
631 'coursecreator' => CAP_ALLOW,
632 'admin' => CAP_ALLOW
633 )
634 ),
635
636 'moodle/blog:manageentries' => array(
637
638 'captype' => 'write',
639 'contextlevel' => CONTEXT_SYSTEM,
640 'legacy' => array(
641 'guest' => CAP_PREVENT,
642 'student' => CAP_PREVENT,
643 'teacher' => CAP_ALLOW,
644 'editingteacher' => CAP_ALLOW,
645 'coursecreator' => CAP_ALLOW,
646 'admin' => CAP_ALLOW
647 )
648 ),
649
650 'moodle/calendar:manageownentries' => array(
651
652 'captype' => 'write',
653 'contextlevel' => CONTEXT_SYSTEM,
654 'legacy' => array(
655 'guest' => CAP_PREVENT,
656 'student' => CAP_ALLOW,
657 'teacher' => CAP_ALLOW,
658 'editingteacher' => CAP_ALLOW,
659 'coursecreator' => CAP_ALLOW,
660 'admin' => CAP_ALLOW
661 )
662 ),
663
664 'moodle/calendar:manageentries' => array(
665
666 'captype' => 'write',
667 'contextlevel' => CONTEXT_SYSTEM,
668 'legacy' => array(
669 'guest' => CAP_PREVENT,
670 'student' => CAP_PREVENT,
671 'teacher' => CAP_ALLOW,
672 'editingteacher' => CAP_ALLOW,
673 'coursecreator' => CAP_ALLOW,
674 'admin' => CAP_ALLOW
675 )
77d4953e 676 ),
677
678 // The next 3 might make no sense for some roles, e.g teacher, etc.
679 // since the next level up is site. These are more for the parent role
680 'moodle/user:readuserposts' => 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 ),
bbbf2d40 692
77d4953e 693 'moodle/user:readuserblogs' => array(
694 'captype' => 'read',
695 'contextlevel' => CONTEXT_USERID,
696 'legacy' => array(
697 'guest' => CAP_PREVENT,
698 'student' => CAP_ALLOW,
699 'teacher' => CAP_ALLOW,
700 'editingteacher' => CAP_ALLOW,
701 'coursecreator' => CAP_ALLOW,
702 'admin' => CAP_ALLOW
703 )
704 ),
705
706 'moodle/user:viewuseractivitiesreport' => array(
707 'captype' => 'read',
708 'contextlevel' => CONTEXT_USERID,
709 'legacy' => array(
710 'guest' => CAP_PREVENT,
711 'student' => CAP_PREVENT,
712 'teacher' => CAP_ALLOW,
713 'editingteacher' => CAP_ALLOW,
714 'coursecreator' => CAP_ALLOW,
715 'admin' => CAP_ALLOW
716 )
945f88ca 717 ),
718
719 'moodle/question:import' => array(
720 'captype' => 'write',
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:export' => array(
733 'captype' => 'read',
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
f43ce1ad 745 'moodle/question:managecategory' => array(
945f88ca 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 )
756 ),
757
758 'moodle/question:manage' => array(
759 'captype' => 'write',
760 'contextlevel' => CONTEXT_COURSE,
761 'legacy' => array(
762 'guest' => CAP_PREVENT,
763 'student' => CAP_PREVENT,
764 'teacher' => CAP_PREVENT,
765 'editingteacher' => CAP_ALLOW,
766 'coursecreator' => CAP_ALLOW,
767 'admin' => CAP_ALLOW
768 )
7191a1fa 769 ),
770
771 'moodle/site:doclinks' => array(
772 'captype' => 'read',
773 'contextlevel' => CONTEXT_SYSTEM,
774 'legacy' => array(
775 'guest' => CAP_PREVENT,
776 'student' => CAP_PREVENT,
777 'teacher' => CAP_ALLOW,
778 'editingteacher' => CAP_ALLOW,
779 'coursecreator' => CAP_ALLOW,
780 'admin' => CAP_ALLOW
781 )
3924b988 782 ),
783
784 'moodle/course:sectionvisibility' => 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:viewhiddensections' => 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:setcurrentsection' => array(
811 'captype' => 'write',
812 'contextlevel' => CONTEXT_COURSE,
813 'legacy' => array(
814 'guest' => CAP_PREVENT,
815 'student' => CAP_PREVENT,
816 'teacher' => CAP_PREVENT,
817 'editingteacher' => CAP_ALLOW,
818 'coursecreator' => CAP_ALLOW,
819 'admin' => CAP_ALLOW
820 )
821 ),
822
823 'moodle/course:viewcoursegrades' => array(
824 'captype' => 'read',
825 'contextlevel' => CONTEXT_COURSE,
826 'legacy' => array(
827 'guest' => CAP_PREVENT,
828 'student' => CAP_PREVENT,
829 'teacher' => CAP_ALLOW,
830 'editingteacher' => CAP_ALLOW,
831 'coursecreator' => CAP_ALLOW,
832 'admin' => CAP_ALLOW
833 )
834 ),
835
836 'moodle/course:managegrades' => array(
837 'captype' => 'write',
838 'contextlevel' => CONTEXT_COURSE,
839 'legacy' => array(
840 'guest' => CAP_PREVENT,
841 'student' => CAP_PREVENT,
842 'teacher' => CAP_PREVENT,
843 'editingteacher' => CAP_ALLOW,
844 'coursecreator' => CAP_ALLOW,
845 'admin' => CAP_ALLOW
846 )
847 ),
848
849 'moodle/user:viewusergrades' => array(
850 'captype' => 'write',
851 'contextlevel' => CONTEXT_COURSE,
852 'legacy' => array(
853 'guest' => CAP_PREVENT,
854 'student' => CAP_ALLOW,
855 'teacher' => CAP_ALLOW,
856 'editingteacher' => CAP_ALLOW,
857 'coursecreator' => CAP_ALLOW,
858 'admin' => CAP_ALLOW
859 )
77d4953e 860 )
f43ce1ad 861
bbbf2d40 862);
863
864?>