adding some strings
[moodle-linuxchix.git] / lib / db / access.php
blob17f9c80b9f65265a6ba58e198bddbe1b53e525b9
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).
13 // CAPABILITY NAMING CONVENTION
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>
19 // component_name should be the same as the directory name of the mod or block.
21 // Core moodle capabilities are defined thus:
22 // moodle/<capabilityclass>:<capabilityname>
24 // Examples: mod/forum:viewpost
25 // block/recent_activity:view
26 // moodle/site:deleteuser
28 // The variable name for the capability definitions array follows the format
29 // $<componenttype>_<component_name>_capabilities
31 // For the core capabilities, the variable is $moodle_capabilities.
34 $moodle_capabilities = array(
36 'moodle/site:doanything' => array(
38 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
40 'captype' => 'admin',
41 'contextlevel' => CONTEXT_SYSTEM
44 'moodle/legacy:guest' => array(
46 'captype' => 'legacy',
47 'contextlevel' => CONTEXT_SYSTEM
50 'moodle/legacy:user' => array(
52 'captype' => 'legacy',
53 'contextlevel' => CONTEXT_SYSTEM
56 'moodle/legacy:student' => array(
58 'riskbitmask' => RISK_SPAM,
60 'captype' => 'legacy',
61 'contextlevel' => CONTEXT_SYSTEM
65 'moodle/legacy:teacher' => array(
67 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
69 'captype' => 'legacy',
70 'contextlevel' => CONTEXT_SYSTEM
74 'moodle/legacy:editingteacher' => array(
76 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
78 'captype' => 'legacy',
79 'contextlevel' => CONTEXT_SYSTEM
83 'moodle/legacy:coursecreator' => array(
85 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
87 'captype' => 'legacy',
88 'contextlevel' => CONTEXT_SYSTEM
92 'moodle/legacy:admin' => array(
94 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
96 'captype' => 'legacy',
97 'contextlevel' => CONTEXT_SYSTEM
101 'moodle/site:config' => array(
103 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
105 'captype' => 'write',
106 'contextlevel' => CONTEXT_SYSTEM,
107 'legacy' => array(
108 'admin' => CAP_ALLOW
112 'moodle/site:readallmessages' => array(
114 'riskbitmask' => RISK_PERSONAL,
116 'captype' => 'read',
117 'contextlevel' => CONTEXT_SYSTEM,
118 'legacy' => array(
119 'admin' => CAP_ALLOW,
120 'editingteacher' => CAP_ALLOW
124 'moodle/site:approvecourse' => array(
126 'riskbitmask' => RISK_XSS,
128 'captype' => 'write',
129 'contextlevel' => CONTEXT_SYSTEM,
130 'legacy' => array(
131 'admin' => CAP_ALLOW
135 'moodle/site:import' => array(
137 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
139 'captype' => 'write',
140 'contextlevel' => CONTEXT_SYSTEM,
141 'legacy' => array(
142 'editingteacher' => CAP_ALLOW,
143 'admin' => CAP_ALLOW
147 'moodle/site:backup' => array(
149 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
151 'captype' => 'write',
152 'contextlevel' => CONTEXT_SYSTEM,
153 'legacy' => array(
154 'editingteacher' => CAP_ALLOW,
155 'admin' => CAP_ALLOW
159 'moodle/site:restore' => array(
161 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
163 'captype' => 'write',
164 'contextlevel' => CONTEXT_SYSTEM,
165 'legacy' => array(
166 'editingteacher' => CAP_ALLOW,
167 'admin' => CAP_ALLOW
171 'moodle/site:manageblocks' => array(
173 'riskbitmask' => RISK_SPAM | RISK_XSS,
175 'captype' => 'write',
176 'contextlevel' => CONTEXT_SYSTEM,
177 'legacy' => array(
178 'editingteacher' => CAP_ALLOW,
179 'admin' => CAP_ALLOW
183 'moodle/site:accessallgroups' => array(
185 'captype' => 'read',
186 'contextlevel' => CONTEXT_SYSTEM,
187 'legacy' => array(
188 'teacher' => CAP_ALLOW,
189 'editingteacher' => CAP_ALLOW,
190 'admin' => CAP_ALLOW
194 'moodle/site:viewfullnames' => array(
196 'captype' => 'read',
197 'contextlevel' => CONTEXT_SYSTEM,
198 'legacy' => array(
199 'teacher' => CAP_ALLOW,
200 'editingteacher' => CAP_ALLOW,
201 'admin' => CAP_ALLOW
205 'moodle/site:viewreports' => array(
207 'riskbitmask' => RISK_PERSONAL,
209 'captype' => 'read',
210 'contextlevel' => CONTEXT_SYSTEM,
211 'legacy' => array(
212 'teacher' => CAP_ALLOW,
213 'editingteacher' => CAP_ALLOW,
214 'admin' => CAP_ALLOW
218 'moodle/site:trustcontent' => array(
220 'riskbitmask' => RISK_XSS,
222 'captype' => 'write',
223 'contextlevel' => CONTEXT_SYSTEM,
224 'legacy' => array(
225 'editingteacher' => CAP_ALLOW,
226 'admin' => CAP_ALLOW
230 'moodle/site:uploadusers' => array(
232 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
234 'captype' => 'write',
235 'contextlevel' => CONTEXT_SYSTEM,
236 'legacy' => array(
237 'admin' => CAP_ALLOW
241 'moodle/site:langeditmaster' => array(
243 'riskbitmask' => RISK_CONFIG | RISK_XSS,
245 'captype' => 'write',
246 'contextlevel' => CONTEXT_SYSTEM,
247 'legacy' => array(
248 'admin' => CAP_PREVENT
252 'moodle/site:langeditlocal' => array(
254 'riskbitmask' => RISK_CONFIG | RISK_XSS,
256 'captype' => 'write',
257 'contextlevel' => CONTEXT_SYSTEM,
258 'legacy' => array(
259 'admin' => CAP_ALLOW
264 'moodle/user:create' => array(
266 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
268 'captype' => 'write',
269 'contextlevel' => CONTEXT_SYSTEM,
270 'legacy' => array(
271 'admin' => CAP_ALLOW
275 'moodle/user:delete' => array(
277 'riskbitmask' => RISK_PERSONAL,
279 'captype' => 'write',
280 'contextlevel' => CONTEXT_SYSTEM,
281 'legacy' => array(
282 'admin' => CAP_ALLOW
286 'moodle/user:update' => array(
288 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
290 'captype' => 'write',
291 'contextlevel' => CONTEXT_SYSTEM,
292 'legacy' => array(
293 'admin' => CAP_ALLOW
297 'moodle/user:viewdetails' => array(
299 'captype' => 'read',
300 'contextlevel' => CONTEXT_SYSTEM,
301 'legacy' => array(
302 'guest' => CAP_ALLOW,
303 'student' => CAP_ALLOW,
304 'teacher' => CAP_ALLOW,
305 'editingteacher' => CAP_ALLOW,
306 'admin' => CAP_ALLOW
310 'moodle/user:viewhiddendetails' => array(
312 'riskbitmask' => RISK_PERSONAL,
314 'captype' => 'read',
315 'contextlevel' => CONTEXT_SYSTEM,
316 'legacy' => array(
317 'teacher' => CAP_ALLOW,
318 'editingteacher' => CAP_ALLOW,
319 'admin' => CAP_ALLOW
323 'moodle/user:loginas' => array(
325 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
327 'captype' => 'write',
328 'contextlevel' => CONTEXT_COURSE,
329 'legacy' => array(
330 'admin' => CAP_ALLOW
334 'moodle/role:assign' => array(
336 'captype' => 'write',
337 'contextlevel' => CONTEXT_SYSTEM,
338 'legacy' => array(
339 'editingteacher' => CAP_ALLOW,
340 'admin' => CAP_ALLOW
344 'moodle/role:override' => array(
346 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
348 'captype' => 'write',
349 'contextlevel' => CONTEXT_SYSTEM,
350 'legacy' => array(
351 'admin' => CAP_ALLOW
355 'moodle/role:manage' => array(
357 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
359 'captype' => 'write',
360 'contextlevel' => CONTEXT_SYSTEM,
361 'legacy' => array(
362 'admin' => CAP_ALLOW
366 'moodle/role:unassignself' => array(
368 'captype' => 'write',
369 'contextlevel' => CONTEXT_SYSTEM,
370 'legacy' => array(
371 'student' => (empty($CFG->allowunenrol)) ? CAP_INHERIT : CAP_ALLOW,
372 'teacher' => CAP_ALLOW,
373 'editingteacher' => CAP_ALLOW,
374 'coursecreator' => CAP_ALLOW,
375 'admin' => CAP_ALLOW
379 'moodle/role:viewhiddenassigns' => array(
381 'captype' => 'read',
382 'contextlevel' => CONTEXT_SYSTEM,
383 'legacy' => array(
384 'teacher' => CAP_ALLOW,
385 'editingteacher' => CAP_ALLOW,
386 'admin' => CAP_ALLOW
390 'moodle/role:switchroles' => array(
392 'riskbitmask' => RISK_XSS,
394 'captype' => 'read',
395 'contextlevel' => CONTEXT_SYSTEM,
396 'legacy' => array(
397 'editingteacher' => CAP_ALLOW,
398 'admin' => CAP_ALLOW
402 'moodle/category:create' => array(
404 'riskbitmask' => RISK_XSS,
406 'captype' => 'write',
407 'contextlevel' => CONTEXT_COURSECAT,
408 'legacy' => array(
409 'admin' => CAP_ALLOW
413 'moodle/category:delete' => array(
415 'captype' => 'write',
416 'contextlevel' => CONTEXT_COURSECAT,
417 'legacy' => array(
418 'admin' => CAP_ALLOW
422 'moodle/category:update' => array(
424 'riskbitmask' => RISK_XSS,
426 'captype' => 'write',
427 'contextlevel' => CONTEXT_COURSECAT,
428 'legacy' => array(
429 'admin' => CAP_ALLOW
433 'moodle/category:visibility' => array(
435 'captype' => 'write',
436 'contextlevel' => CONTEXT_COURSECAT,
437 'legacy' => array(
438 'admin' => CAP_ALLOW
442 'moodle/course:create' => array(
444 'riskbitmask' => RISK_XSS,
446 'captype' => 'write',
447 'contextlevel' => CONTEXT_COURSECAT,
448 'legacy' => array(
449 'coursecreator' => CAP_ALLOW,
450 'admin' => CAP_ALLOW
454 'moodle/course:delete' => array(
456 'captype' => 'write',
457 'contextlevel' => CONTEXT_COURSE,
458 'legacy' => array(
459 'admin' => CAP_ALLOW
463 'moodle/course:update' => array(
465 'riskbitmask' => RISK_XSS,
467 'captype' => 'write',
468 'contextlevel' => CONTEXT_COURSE,
469 'legacy' => array(
470 'editingteacher' => CAP_ALLOW,
471 'admin' => CAP_ALLOW
475 'moodle/course:view' => array(
477 'captype' => 'read',
478 'contextlevel' => CONTEXT_COURSE,
479 'legacy' => array(
480 'guest' => CAP_ALLOW,
481 'student' => CAP_ALLOW,
482 'teacher' => CAP_ALLOW,
483 'editingteacher' => CAP_ALLOW
487 'moodle/course:bulkmessaging' => array(
489 'riskbitmask' => RISK_SPAM,
491 'captype' => 'write',
492 'contextlevel' => CONTEXT_COURSE,
493 'legacy' => array(
494 'teacher' => CAP_ALLOW,
495 'editingteacher' => CAP_ALLOW,
496 'admin' => CAP_ALLOW
500 'moodle/course:viewhiddenuserfields' => array(
502 'riskbitmask' => RISK_PERSONAL,
504 'captype' => 'read',
505 'contextlevel' => CONTEXT_COURSE,
506 'legacy' => array(
507 'teacher' => CAP_ALLOW,
508 'editingteacher' => CAP_ALLOW,
509 'admin' => CAP_ALLOW
513 'moodle/course:viewhiddencourses' => array(
515 'captype' => 'read',
516 'contextlevel' => CONTEXT_COURSE,
517 'legacy' => array(
518 'coursecreator' => CAP_ALLOW,
519 'teacher' => CAP_ALLOW,
520 'editingteacher' => CAP_ALLOW,
521 'admin' => CAP_ALLOW
525 'moodle/course:visibility' => array(
527 'captype' => 'write',
528 'contextlevel' => CONTEXT_COURSE,
529 'legacy' => array(
530 'admin' => CAP_ALLOW
534 'moodle/course:managefiles' => array(
536 'riskbitmask' => RISK_XSS,
538 'captype' => 'write',
539 'contextlevel' => CONTEXT_COURSE,
540 'legacy' => array(
541 'editingteacher' => CAP_ALLOW,
542 'admin' => CAP_ALLOW
546 'moodle/course:manageactivities' => array(
548 'riskbitmask' => RISK_XSS,
550 'captype' => 'write',
551 'contextlevel' => CONTEXT_COURSE,
552 'legacy' => array(
553 'editingteacher' => CAP_ALLOW,
554 'admin' => CAP_ALLOW
558 'moodle/course:managemetacourse' => array(
560 'captype' => 'write',
561 'contextlevel' => CONTEXT_COURSE,
562 'legacy' => array(
563 'editingteacher' => CAP_ALLOW,
564 'admin' => CAP_ALLOW
568 'moodle/course:activityvisibility' => array(
570 'captype' => 'write',
571 'contextlevel' => CONTEXT_COURSE,
572 'legacy' => array(
573 'editingteacher' => CAP_ALLOW,
574 'admin' => CAP_ALLOW
578 'moodle/course:viewhiddenactivities' => array(
580 'captype' => 'write',
581 'contextlevel' => CONTEXT_COURSE,
582 'legacy' => array(
583 'teacher' => CAP_ALLOW,
584 'editingteacher' => CAP_ALLOW,
585 'admin' => CAP_ALLOW
589 'moodle/course:viewparticipants' => array(
591 'captype' => 'read',
592 'contextlevel' => CONTEXT_COURSE,
593 'legacy' => array(
594 'student' => CAP_ALLOW,
595 'teacher' => CAP_ALLOW,
596 'editingteacher' => CAP_ALLOW,
597 'admin' => CAP_ALLOW
601 'moodle/course:viewscales' => array(
603 'captype' => 'read',
604 'contextlevel' => CONTEXT_COURSE,
605 'legacy' => array(
606 'student' => CAP_ALLOW,
607 'teacher' => CAP_ALLOW,
608 'editingteacher' => CAP_ALLOW,
609 'admin' => CAP_ALLOW
613 'moodle/course:managescales' => array(
615 'captype' => 'write',
616 'contextlevel' => CONTEXT_COURSE,
617 'legacy' => array(
618 'editingteacher' => CAP_ALLOW,
619 'admin' => CAP_ALLOW
623 'moodle/course:managegroups' => array(
625 'captype' => 'write',
626 'contextlevel' => CONTEXT_COURSE,
627 'legacy' => array(
628 'editingteacher' => CAP_ALLOW,
629 'admin' => CAP_ALLOW
633 'moodle/course:reset' => array(
635 'captype' => 'write',
636 'contextlevel' => CONTEXT_COURSE,
637 'legacy' => array(
638 'editingteacher' => CAP_ALLOW,
639 'admin' => CAP_ALLOW
643 'moodle/blog:view' => array(
645 'captype' => 'read',
646 'contextlevel' => CONTEXT_SYSTEM,
647 'legacy' => array(
648 'guest' => CAP_ALLOW,
649 'user' => CAP_ALLOW,
650 'student' => CAP_ALLOW,
651 'teacher' => CAP_ALLOW,
652 'editingteacher' => CAP_ALLOW,
653 'admin' => CAP_ALLOW
657 'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only
659 'riskbitmask' => RISK_SPAM,
661 'captype' => 'write',
662 'contextlevel' => CONTEXT_SYSTEM,
663 'legacy' => array(
664 'user' => CAP_ALLOW,
665 'admin' => CAP_ALLOW
669 'moodle/blog:manageofficialtags' => array(
671 'riskbitmask' => RISK_SPAM,
673 'captype' => 'write',
674 'contextlevel' => CONTEXT_SYSTEM,
675 'legacy' => array(
676 'admin' => CAP_ALLOW
680 'moodle/blog:managepersonaltags' => array(
682 'riskbitmask' => RISK_SPAM,
684 'captype' => 'write',
685 'contextlevel' => CONTEXT_SYSTEM,
686 'legacy' => array(
687 'student' => CAP_ALLOW,
688 'teacher' => CAP_ALLOW,
689 'editingteacher' => CAP_ALLOW,
690 'admin' => CAP_ALLOW
694 'moodle/blog:manageentries' => array(
696 'riskbitmask' => RISK_SPAM,
698 'captype' => 'write',
699 'contextlevel' => CONTEXT_SYSTEM,
700 'legacy' => array(
701 'teacher' => CAP_ALLOW,
702 'editingteacher' => CAP_ALLOW,
703 'admin' => CAP_ALLOW
707 'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only
709 'riskbitmask' => RISK_SPAM,
711 'captype' => 'write',
712 'contextlevel' => CONTEXT_SYSTEM,
713 'legacy' => array(
714 'user' => CAP_ALLOW,
715 'admin' => CAP_ALLOW
719 'moodle/calendar:manageentries' => array(
721 'riskbitmask' => RISK_SPAM,
723 'captype' => 'write',
724 'contextlevel' => CONTEXT_SYSTEM,
725 'legacy' => array(
726 'teacher' => CAP_ALLOW,
727 'editingteacher' => CAP_ALLOW,
728 'admin' => CAP_ALLOW
732 'moodle/user:editprofile' => array(
734 'riskbitmask' => RISK_SPAM,
736 'captype' => 'write',
737 'contextlevel' => CONTEXT_USER,
738 'legacy' => array(
739 'admin' => CAP_ALLOW
743 'moodle/user:editownprofile' => array(
745 'captype' => 'write',
746 'contextlevel' => CONTEXT_SYSTEM,
747 'legacy' => array(
748 'guest' => CAP_PROHIBIT,
749 'user' => CAP_ALLOW,
750 'admin' => CAP_ALLOW
754 'moodle/user:changeownpassword' => array(
756 'captype' => 'write',
757 'contextlevel' => CONTEXT_SYSTEM,
758 'legacy' => array(
759 'guest' => CAP_PROHIBIT,
760 'user' => CAP_ALLOW,
761 'admin' => CAP_ALLOW
765 // The next 3 might make no sense for some roles, e.g teacher, etc.
766 // since the next level up is site. These are more for the parent role
767 'moodle/user:readuserposts' => array(
769 'captype' => 'read',
770 'contextlevel' => CONTEXT_USER,
771 'legacy' => array(
772 'student' => CAP_ALLOW,
773 'teacher' => CAP_ALLOW,
774 'editingteacher' => CAP_ALLOW,
775 'admin' => CAP_ALLOW
779 'moodle/user:readuserblogs' => array(
781 'captype' => 'read',
782 'contextlevel' => CONTEXT_USER,
783 'legacy' => array(
784 'student' => CAP_ALLOW,
785 'teacher' => CAP_ALLOW,
786 'editingteacher' => CAP_ALLOW,
787 'admin' => CAP_ALLOW
791 'moodle/user:viewuseractivitiesreport' => array(
793 'captype' => 'read',
794 'contextlevel' => CONTEXT_USER,
795 'legacy' => array(
796 'teacher' => CAP_ALLOW,
797 'editingteacher' => CAP_ALLOW,
798 'admin' => CAP_ALLOW
802 'moodle/question:import' => array(
804 'riskbitmask' => RISK_XSS,
806 'captype' => 'write',
807 'contextlevel' => CONTEXT_COURSE,
808 'legacy' => array(
809 'editingteacher' => CAP_ALLOW,
810 'admin' => CAP_ALLOW
814 'moodle/question:export' => array(
816 'captype' => 'read',
817 'contextlevel' => CONTEXT_COURSE,
818 'legacy' => array(
819 'editingteacher' => CAP_ALLOW,
820 'admin' => CAP_ALLOW
824 'moodle/question:managecategory' => array(
826 'captype' => 'write',
827 'contextlevel' => CONTEXT_COURSE,
828 'legacy' => array(
829 'editingteacher' => CAP_ALLOW,
830 'admin' => CAP_ALLOW
834 'moodle/question:manage' => array(
836 'riskbitmask' => RISK_XSS,
838 'captype' => 'write',
839 'contextlevel' => CONTEXT_COURSE,
840 'legacy' => array(
841 'editingteacher' => CAP_ALLOW,
842 'admin' => CAP_ALLOW
846 // Configure the installed question types.
847 'moodle/question:config' => array(
849 'riskbitmask' => RISK_CONFIG,
851 'captype' => 'write',
852 'contextlevel' => CONTEXT_SYSTEM,
853 'legacy' => array(
854 'admin' => CAP_ALLOW
858 'moodle/site:doclinks' => array(
860 'captype' => 'read',
861 'contextlevel' => CONTEXT_SYSTEM,
862 'legacy' => array(
863 'teacher' => CAP_ALLOW,
864 'editingteacher' => CAP_ALLOW,
865 'admin' => CAP_ALLOW
869 'moodle/course:sectionvisibility' => array(
871 'captype' => 'write',
872 'contextlevel' => CONTEXT_COURSE,
873 'legacy' => array(
874 'editingteacher' => CAP_ALLOW,
875 'admin' => CAP_ALLOW
879 'moodle/course:useremail' => array(
881 'captype' => 'write',
882 'contextlevel' => CONTEXT_COURSE,
883 'legacy' => array(
884 'editingteacher' => CAP_ALLOW,
885 'admin' => CAP_ALLOW
889 'moodle/course:viewhiddensections' => array(
891 'captype' => 'write',
892 'contextlevel' => CONTEXT_COURSE,
893 'legacy' => array(
894 'editingteacher' => CAP_ALLOW,
895 'admin' => CAP_ALLOW
899 'moodle/course:setcurrentsection' => array(
901 'captype' => 'write',
902 'contextlevel' => CONTEXT_COURSE,
903 'legacy' => array(
904 'editingteacher' => CAP_ALLOW,
905 'admin' => CAP_ALLOW
909 'moodle/site:mnetlogintoremote' => array(
910 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
911 'captype' => 'read',
912 'contextlevel' => CONTEXT_SYSTEM,
913 'legacy' => array(
914 'admin' => CAP_ALLOW
918 'moodle/grade:viewall' => array(
919 'riskbitmask' => RISK_PERSONAL,
920 'captype' => 'read',
921 'contextlevel' => CONTEXT_COURSE,
922 'legacy' => array(
923 'teacher' => CAP_ALLOW,
924 'editingteacher' => CAP_ALLOW,
925 'admin' => CAP_ALLOW
927 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
930 'moodle/grade:view' => array(
931 'captype' => 'read',
932 'contextlevel' => CONTEXT_COURSE, // and CONTEXT_PERSONAL too
933 'legacy' => array(
934 'student' => CAP_ALLOW
938 'moodle/grade:viewhidden' => array(
939 'riskbitmask' => RISK_PERSONAL,
940 'captype' => 'read',
941 'contextlevel' => CONTEXT_COURSE, // and CONTEXT_PERSONAL too
942 'legacy' => array(
944 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
947 'moodle/grade:import' => array(
948 'riskbitmask' => RISK_PERSONAL,
949 'captype' => 'write',
950 'contextlevel' => CONTEXT_COURSE,
951 'legacy' => array(
952 'editingteacher' => CAP_ALLOW,
953 'admin' => CAP_ALLOW
955 'clonepermissionsfrom' => 'moodle/course:managegrades'
958 'moodle/grade:export' => array(
959 'riskbitmask' => RISK_PERSONAL,
960 'captype' => 'read',
961 'contextlevel' => CONTEXT_COURSE,
962 'legacy' => array(
963 'teacher' => CAP_ALLOW,
964 'editingteacher' => CAP_ALLOW,
965 'admin' => CAP_ALLOW
967 'clonepermissionsfrom' => 'moodle/course:managegrades'
970 'moodle/grade:manage' => array(
971 'riskbitmask' => RISK_PERSONAL,
972 'captype' => 'write',
973 'contextlevel' => CONTEXT_COURSE,
974 'legacy' => array(
975 'editingteacher' => CAP_ALLOW,
976 'admin' => CAP_ALLOW
978 'clonepermissionsfrom' => 'moodle/course:managegrades'
981 'moodle/grade:hide' => array(
982 'captype' => 'write',
983 'contextlevel' => CONTEXT_COURSE,
984 'legacy' => array(
985 'editingteacher' => CAP_ALLOW,
986 'admin' => CAP_ALLOW
990 'moodle/grade:lock' => array(
991 'captype' => 'write',
992 'contextlevel' => CONTEXT_COURSE,
993 'legacy' => array(
994 'editingteacher' => CAP_ALLOW,
995 'admin' => CAP_ALLOW
999 'moodle/grade:unlock' => array(
1000 'captype' => 'write',
1001 'contextlevel' => CONTEXT_COURSE,
1002 'legacy' => array(
1003 'editingteacher' => CAP_ALLOW,
1004 'admin' => CAP_ALLOW
1008 'moodle/grade:override' => array(
1009 'captype' => 'write',
1010 'contextlevel' => CONTEXT_COURSE,
1011 'legacy' => array(
1012 'editingteacher' => CAP_ALLOW,
1013 'admin' => CAP_ALLOW
1017 'moodle/my:manageblocks' => array(
1018 'captype' => 'write',
1019 'contextlevel' => CONTEXT_SYSTEM,
1020 'legacy' => array(
1021 'user' => CAP_ALLOW
1025 'moodle/notes:view' => array(
1026 'captype' => 'read',
1027 'contextlevel' => CONTEXT_SYSTEM,
1028 'legacy' => array(
1029 'teacher' => CAP_ALLOW,
1030 'editingteacher' => CAP_ALLOW,
1031 'admin' => CAP_ALLOW
1035 'moodle/notes:manage' => array(
1036 'captype' => 'write',
1037 'contextlevel' => CONTEXT_SYSTEM,
1038 'legacy' => array(
1039 'teacher' => CAP_ALLOW,
1040 'editingteacher' => CAP_ALLOW,
1041 'admin' => CAP_ALLOW