3 // Capability definitions for Moodle core.
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.
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
,
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
,
112 'moodle/site:readallmessages' => array(
114 'riskbitmask' => RISK_PERSONAL
,
117 'contextlevel' => CONTEXT_SYSTEM
,
119 'admin' => CAP_ALLOW
,
120 'editingteacher' => CAP_ALLOW
124 'moodle/site:sendmessage' => array(
126 'riskbitmask' => RISK_PERSONAL
,
128 'captype' => 'write',
129 'contextlevel' => CONTEXT_SYSTEM
,
131 'admin' => CAP_ALLOW
,
136 'moodle/site:approvecourse' => array(
138 'riskbitmask' => RISK_XSS
,
140 'captype' => 'write',
141 'contextlevel' => CONTEXT_SYSTEM
,
147 'moodle/site:import' => array(
149 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS
,
151 'captype' => 'write',
152 'contextlevel' => CONTEXT_SYSTEM
,
154 'editingteacher' => CAP_ALLOW
,
159 'moodle/site:backup' => array(
161 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS
,
163 'captype' => 'write',
164 'contextlevel' => CONTEXT_SYSTEM
,
166 'editingteacher' => CAP_ALLOW
,
171 'moodle/site:restore' => array(
173 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS
,
175 'captype' => 'write',
176 'contextlevel' => CONTEXT_SYSTEM
,
178 'editingteacher' => CAP_ALLOW
,
183 'moodle/site:manageblocks' => array(
185 'riskbitmask' => RISK_SPAM | RISK_XSS
,
187 'captype' => 'write',
188 'contextlevel' => CONTEXT_SYSTEM
,
190 'editingteacher' => CAP_ALLOW
,
195 'moodle/site:accessallgroups' => array(
198 'contextlevel' => CONTEXT_SYSTEM
,
200 'teacher' => CAP_ALLOW
,
201 'editingteacher' => CAP_ALLOW
,
206 'moodle/site:viewfullnames' => array(
209 'contextlevel' => CONTEXT_SYSTEM
,
211 'teacher' => CAP_ALLOW
,
212 'editingteacher' => CAP_ALLOW
,
217 'moodle/site:viewreports' => array(
219 'riskbitmask' => RISK_PERSONAL
,
222 'contextlevel' => CONTEXT_SYSTEM
,
224 'teacher' => CAP_ALLOW
,
225 'editingteacher' => CAP_ALLOW
,
230 'moodle/site:trustcontent' => array(
232 'riskbitmask' => RISK_XSS
,
234 'captype' => 'write',
235 'contextlevel' => CONTEXT_SYSTEM
,
237 'editingteacher' => CAP_ALLOW
,
242 'moodle/site:uploadusers' => array(
244 'riskbitmask' => RISK_SPAM | RISK_PERSONAL
,
246 'captype' => 'write',
247 'contextlevel' => CONTEXT_SYSTEM
,
253 'moodle/site:langeditmaster' => array(
255 'riskbitmask' => RISK_CONFIG | RISK_XSS
,
257 'captype' => 'write',
258 'contextlevel' => CONTEXT_SYSTEM
,
260 'admin' => CAP_PREVENT
264 'moodle/site:langeditlocal' => array(
266 'riskbitmask' => RISK_CONFIG | RISK_XSS
,
268 'captype' => 'write',
269 'contextlevel' => CONTEXT_SYSTEM
,
276 'moodle/user:create' => array(
278 'riskbitmask' => RISK_SPAM | RISK_PERSONAL
,
280 'captype' => 'write',
281 'contextlevel' => CONTEXT_SYSTEM
,
287 'moodle/user:delete' => array(
289 'riskbitmask' => RISK_PERSONAL
,
291 'captype' => 'write',
292 'contextlevel' => CONTEXT_SYSTEM
,
298 'moodle/user:update' => array(
300 'riskbitmask' => RISK_SPAM | RISK_PERSONAL
,
302 'captype' => 'write',
303 'contextlevel' => CONTEXT_SYSTEM
,
309 'moodle/user:viewdetails' => array(
312 'contextlevel' => CONTEXT_SYSTEM
,
314 'guest' => CAP_ALLOW
,
315 'student' => CAP_ALLOW
,
316 'teacher' => CAP_ALLOW
,
317 'editingteacher' => CAP_ALLOW
,
322 'moodle/user:viewhiddendetails' => array(
324 'riskbitmask' => RISK_PERSONAL
,
327 'contextlevel' => CONTEXT_SYSTEM
,
329 'teacher' => CAP_ALLOW
,
330 'editingteacher' => CAP_ALLOW
,
335 'moodle/user:loginas' => array(
337 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG
,
339 'captype' => 'write',
340 'contextlevel' => CONTEXT_COURSE
,
346 'moodle/role:assign' => array(
348 'captype' => 'write',
349 'contextlevel' => CONTEXT_SYSTEM
,
351 'editingteacher' => CAP_ALLOW
,
356 'moodle/role:override' => array(
358 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS
,
360 'captype' => 'write',
361 'contextlevel' => CONTEXT_SYSTEM
,
367 'moodle/role:manage' => array(
369 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS
,
371 'captype' => 'write',
372 'contextlevel' => CONTEXT_SYSTEM
,
378 'moodle/role:unassignself' => array(
380 'captype' => 'write',
381 'contextlevel' => CONTEXT_SYSTEM
,
383 'student' => (empty($CFG->allowunenrol
)) ? CAP_INHERIT
: CAP_ALLOW
,
384 'teacher' => CAP_ALLOW
,
385 'editingteacher' => CAP_ALLOW
,
386 'coursecreator' => CAP_ALLOW
,
391 'moodle/role:viewhiddenassigns' => array(
394 'contextlevel' => CONTEXT_SYSTEM
,
396 'teacher' => CAP_ALLOW
,
397 'editingteacher' => CAP_ALLOW
,
402 'moodle/role:switchroles' => array(
404 'riskbitmask' => RISK_XSS
,
407 'contextlevel' => CONTEXT_SYSTEM
,
409 'editingteacher' => CAP_ALLOW
,
414 'moodle/category:create' => array(
416 'riskbitmask' => RISK_XSS
,
418 'captype' => 'write',
419 'contextlevel' => CONTEXT_COURSECAT
,
425 'moodle/category:delete' => array(
427 'captype' => 'write',
428 'contextlevel' => CONTEXT_COURSECAT
,
434 'moodle/category:update' => array(
436 'riskbitmask' => RISK_XSS
,
438 'captype' => 'write',
439 'contextlevel' => CONTEXT_COURSECAT
,
445 'moodle/category:visibility' => array(
447 'captype' => 'write',
448 'contextlevel' => CONTEXT_COURSECAT
,
454 'moodle/course:create' => array(
456 'riskbitmask' => RISK_XSS
,
458 'captype' => 'write',
459 'contextlevel' => CONTEXT_COURSECAT
,
461 'coursecreator' => CAP_ALLOW
,
466 'moodle/course:delete' => array(
468 'captype' => 'write',
469 'contextlevel' => CONTEXT_COURSE
,
475 'moodle/course:update' => array(
477 'riskbitmask' => RISK_XSS
,
479 'captype' => 'write',
480 'contextlevel' => CONTEXT_COURSE
,
482 'editingteacher' => CAP_ALLOW
,
487 'moodle/course:view' => array(
490 'contextlevel' => CONTEXT_COURSE
,
492 'guest' => CAP_ALLOW
,
493 'student' => CAP_ALLOW
,
494 'teacher' => CAP_ALLOW
,
495 'editingteacher' => CAP_ALLOW
499 'moodle/course:bulkmessaging' => array(
501 'riskbitmask' => RISK_SPAM
,
503 'captype' => 'write',
504 'contextlevel' => CONTEXT_COURSE
,
506 'teacher' => CAP_ALLOW
,
507 'editingteacher' => CAP_ALLOW
,
512 'moodle/course:viewhiddenuserfields' => array(
514 'riskbitmask' => RISK_PERSONAL
,
517 'contextlevel' => CONTEXT_COURSE
,
519 'teacher' => CAP_ALLOW
,
520 'editingteacher' => CAP_ALLOW
,
525 'moodle/course:viewhiddencourses' => array(
528 'contextlevel' => CONTEXT_COURSE
,
530 'coursecreator' => CAP_ALLOW
,
531 'teacher' => CAP_ALLOW
,
532 'editingteacher' => CAP_ALLOW
,
537 'moodle/course:visibility' => array(
539 'captype' => 'write',
540 'contextlevel' => CONTEXT_COURSE
,
546 'moodle/course:managefiles' => array(
548 'riskbitmask' => RISK_XSS
,
550 'captype' => 'write',
551 'contextlevel' => CONTEXT_COURSE
,
553 'editingteacher' => CAP_ALLOW
,
558 'moodle/course:manageactivities' => array(
560 'riskbitmask' => RISK_XSS
,
562 'captype' => 'write',
563 'contextlevel' => CONTEXT_COURSE
,
565 'editingteacher' => CAP_ALLOW
,
570 'moodle/course:managemetacourse' => array(
572 'captype' => 'write',
573 'contextlevel' => CONTEXT_COURSE
,
575 'editingteacher' => CAP_ALLOW
,
580 'moodle/course:activityvisibility' => array(
582 'captype' => 'write',
583 'contextlevel' => CONTEXT_COURSE
,
585 'editingteacher' => CAP_ALLOW
,
590 'moodle/course:viewhiddenactivities' => array(
592 'captype' => 'write',
593 'contextlevel' => CONTEXT_COURSE
,
595 'teacher' => CAP_ALLOW
,
596 'editingteacher' => CAP_ALLOW
,
601 'moodle/course:viewparticipants' => array(
604 'contextlevel' => CONTEXT_COURSE
,
606 'student' => CAP_ALLOW
,
607 'teacher' => CAP_ALLOW
,
608 'editingteacher' => CAP_ALLOW
,
613 'moodle/site:viewparticipants' => array(
616 'contextlevel' => CONTEXT_SYSTEM
,
622 'moodle/course:viewscales' => array(
625 'contextlevel' => CONTEXT_COURSE
,
627 'student' => CAP_ALLOW
,
628 'teacher' => CAP_ALLOW
,
629 'editingteacher' => CAP_ALLOW
,
634 'moodle/course:managescales' => array(
636 'captype' => 'write',
637 'contextlevel' => CONTEXT_COURSE
,
639 'editingteacher' => CAP_ALLOW
,
644 'moodle/course:managegroups' => array(
646 'captype' => 'write',
647 'contextlevel' => CONTEXT_COURSE
,
649 'editingteacher' => CAP_ALLOW
,
654 'moodle/course:reset' => array(
656 'captype' => 'write',
657 'contextlevel' => CONTEXT_COURSE
,
659 'editingteacher' => CAP_ALLOW
,
664 'moodle/blog:view' => array(
667 'contextlevel' => CONTEXT_SYSTEM
,
669 'guest' => CAP_ALLOW
,
671 'student' => CAP_ALLOW
,
672 'teacher' => CAP_ALLOW
,
673 'editingteacher' => CAP_ALLOW
,
678 'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only
680 'riskbitmask' => RISK_SPAM
,
682 'captype' => 'write',
683 'contextlevel' => CONTEXT_SYSTEM
,
690 'moodle/blog:manageentries' => array(
692 'riskbitmask' => RISK_SPAM
,
694 'captype' => 'write',
695 'contextlevel' => CONTEXT_SYSTEM
,
697 'teacher' => CAP_ALLOW
,
698 'editingteacher' => CAP_ALLOW
,
703 'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only
705 'riskbitmask' => RISK_SPAM
,
707 'captype' => 'write',
708 'contextlevel' => CONTEXT_SYSTEM
,
715 'moodle/calendar:managegroupentries' => array(
717 'riskbitmask' => RISK_SPAM
,
719 'captype' => 'write',
720 'contextlevel' => CONTEXT_SYSTEM
,
722 'teacher' => CAP_ALLOW
,
723 'editingteacher' => CAP_ALLOW
,
728 'moodle/calendar:manageentries' => array(
730 'riskbitmask' => RISK_SPAM
,
732 'captype' => 'write',
733 'contextlevel' => CONTEXT_SYSTEM
,
735 'teacher' => CAP_ALLOW
,
736 'editingteacher' => CAP_ALLOW
,
741 'moodle/user:editprofile' => array(
743 'riskbitmask' => RISK_SPAM
,
745 'captype' => 'write',
746 'contextlevel' => CONTEXT_USER
,
752 'moodle/user:editownprofile' => array(
754 'captype' => 'write',
755 'contextlevel' => CONTEXT_SYSTEM
,
757 'guest' => CAP_PROHIBIT
,
763 'moodle/user:changeownpassword' => array(
765 'captype' => 'write',
766 'contextlevel' => CONTEXT_SYSTEM
,
768 'guest' => CAP_PROHIBIT
,
774 // The next 3 might make no sense for some roles, e.g teacher, etc.
775 // since the next level up is site. These are more for the parent role
776 'moodle/user:readuserposts' => array(
779 'contextlevel' => CONTEXT_USER
,
781 'student' => CAP_ALLOW
,
782 'teacher' => CAP_ALLOW
,
783 'editingteacher' => CAP_ALLOW
,
788 'moodle/user:readuserblogs' => array(
791 'contextlevel' => CONTEXT_USER
,
793 'student' => CAP_ALLOW
,
794 'teacher' => CAP_ALLOW
,
795 'editingteacher' => CAP_ALLOW
,
800 'moodle/user:viewuseractivitiesreport' => array(
803 'contextlevel' => CONTEXT_USER
,
805 'teacher' => CAP_ALLOW
,
806 'editingteacher' => CAP_ALLOW
,
811 'moodle/question:managecategory' => array(
813 'captype' => 'write',
814 'contextlevel' => CONTEXT_COURSE
,
816 'editingteacher' => CAP_ALLOW
,
822 'moodle/question:add' => array(
823 'riskbitmask' => RISK_SPAM
,
824 'captype' => 'write',
825 'contextlevel' => CONTEXT_COURSE
,
827 'editingteacher' => CAP_ALLOW
,
830 'clonepermissionsfrom' => 'moodle/question:manage'
832 'moodle/question:editmine' => array(
833 'riskbitmask' => RISK_SPAM
,
834 'captype' => 'write',
835 'contextlevel' => CONTEXT_COURSE
,
837 'editingteacher' => CAP_ALLOW
,
840 'clonepermissionsfrom' => 'moodle/question:manage'
842 'moodle/question:editall' => array(
843 'riskbitmask' => RISK_SPAM
,
844 'captype' => 'write',
845 'contextlevel' => CONTEXT_COURSE
,
847 'editingteacher' => CAP_ALLOW
,
850 'clonepermissionsfrom' => 'moodle/question:manage'
852 'moodle/question:viewmine' => array(
854 'contextlevel' => CONTEXT_COURSE
,
856 'editingteacher' => CAP_ALLOW
,
859 'clonepermissionsfrom' => 'moodle/question:manage'
861 'moodle/question:viewall' => array(
863 'contextlevel' => CONTEXT_COURSE
,
865 'editingteacher' => CAP_ALLOW
,
868 'clonepermissionsfrom' => 'moodle/question:manage'
870 'moodle/question:usemine' => array(
872 'contextlevel' => CONTEXT_COURSE
,
874 'editingteacher' => CAP_ALLOW
,
877 'clonepermissionsfrom' => 'moodle/question:manage'
879 'moodle/question:useall' => array(
881 'contextlevel' => CONTEXT_COURSE
,
883 'editingteacher' => CAP_ALLOW
,
886 'clonepermissionsfrom' => 'moodle/question:manage'
888 'moodle/question:movemine' => array(
889 'captype' => 'write',
890 'contextlevel' => CONTEXT_COURSE
,
892 'editingteacher' => CAP_ALLOW
,
895 'clonepermissionsfrom' => 'moodle/question:manage'
897 'moodle/question:moveall' => array(
898 'captype' => 'write',
899 'contextlevel' => CONTEXT_COURSE
,
901 'editingteacher' => CAP_ALLOW
,
904 'clonepermissionsfrom' => 'moodle/question:manage'
906 //END new in moodle 1.9
908 // Configure the installed question types.
909 'moodle/question:config' => array(
911 'riskbitmask' => RISK_CONFIG
,
913 'captype' => 'write',
914 'contextlevel' => CONTEXT_SYSTEM
,
920 'moodle/site:doclinks' => array(
923 'contextlevel' => CONTEXT_SYSTEM
,
925 'teacher' => CAP_ALLOW
,
926 'editingteacher' => CAP_ALLOW
,
931 'moodle/course:sectionvisibility' => array(
933 'captype' => 'write',
934 'contextlevel' => CONTEXT_COURSE
,
936 'editingteacher' => CAP_ALLOW
,
941 'moodle/course:useremail' => array(
943 'captype' => 'write',
944 'contextlevel' => CONTEXT_COURSE
,
946 'editingteacher' => CAP_ALLOW
,
951 'moodle/course:viewhiddensections' => array(
953 'captype' => 'write',
954 'contextlevel' => CONTEXT_COURSE
,
956 'editingteacher' => CAP_ALLOW
,
961 'moodle/course:setcurrentsection' => array(
963 'captype' => 'write',
964 'contextlevel' => CONTEXT_COURSE
,
966 'editingteacher' => CAP_ALLOW
,
971 'moodle/site:mnetlogintoremote' => array(
972 'riskbitmask' => RISK_PERSONAL | RISK_XSS
,
974 'contextlevel' => CONTEXT_SYSTEM
,
980 'moodle/grade:viewall' => array(
981 'riskbitmask' => RISK_PERSONAL
,
983 'contextlevel' => CONTEXT_COURSE
, // and CONTEXT_USER
985 'teacher' => CAP_ALLOW
,
986 'editingteacher' => CAP_ALLOW
,
989 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
992 'moodle/grade:view' => array(
994 'contextlevel' => CONTEXT_COURSE
,
996 'student' => CAP_ALLOW
1000 'moodle/grade:viewhidden' => array(
1001 'riskbitmask' => RISK_PERSONAL
,
1002 'captype' => 'read',
1003 'contextlevel' => CONTEXT_COURSE
,
1005 'teacher' => CAP_ALLOW
,
1006 'editingteacher' => CAP_ALLOW
,
1007 'admin' => CAP_ALLOW
1009 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
1012 'moodle/grade:import' => array(
1013 'riskbitmask' => RISK_PERSONAL
,
1014 'captype' => 'write',
1015 'contextlevel' => CONTEXT_COURSE
,
1017 'editingteacher' => CAP_ALLOW
,
1018 'admin' => CAP_ALLOW
1020 'clonepermissionsfrom' => 'moodle/course:managegrades'
1023 'moodle/grade:export' => array(
1024 'riskbitmask' => RISK_PERSONAL
,
1025 'captype' => 'read',
1026 'contextlevel' => CONTEXT_COURSE
,
1028 'teacher' => CAP_ALLOW
,
1029 'editingteacher' => CAP_ALLOW
,
1030 'admin' => CAP_ALLOW
1032 'clonepermissionsfrom' => 'moodle/course:managegrades'
1035 'moodle/grade:manage' => array(
1036 'riskbitmask' => RISK_PERSONAL
,
1037 'captype' => 'write',
1038 'contextlevel' => CONTEXT_COURSE
,
1040 'editingteacher' => CAP_ALLOW
,
1041 'admin' => CAP_ALLOW
1043 'clonepermissionsfrom' => 'moodle/course:managegrades'
1046 'moodle/grade:edit' => array(
1047 'riskbitmask' => RISK_PERSONAL | RISK_XSS
,
1048 'captype' => 'write',
1049 'contextlevel' => CONTEXT_COURSE
,
1051 'editingteacher' => CAP_ALLOW
,
1052 'admin' => CAP_ALLOW
1054 'clonepermissionsfrom' => 'moodle/course:managegrades'
1057 'moodle/grade:manageoutcomes' => array(
1058 'captype' => 'write',
1059 'contextlevel' => CONTEXT_COURSE
,
1061 'editingteacher' => CAP_ALLOW
,
1062 'admin' => CAP_ALLOW
1064 'clonepermissionsfrom' => 'moodle/course:managegrades'
1067 'moodle/grade:manageletters' => array(
1068 'captype' => 'write',
1069 'contextlevel' => CONTEXT_COURSE
,
1071 'editingteacher' => CAP_ALLOW
,
1072 'admin' => CAP_ALLOW
1074 'clonepermissionsfrom' => 'moodle/course:managegrades'
1077 'moodle/grade:hide' => array(
1078 'captype' => 'write',
1079 'contextlevel' => CONTEXT_COURSE
,
1081 'editingteacher' => CAP_ALLOW
,
1082 'admin' => CAP_ALLOW
1086 'moodle/grade:lock' => array(
1087 'captype' => 'write',
1088 'contextlevel' => CONTEXT_COURSE
,
1090 'editingteacher' => CAP_ALLOW
,
1091 'admin' => CAP_ALLOW
1095 'moodle/grade:unlock' => array(
1096 'captype' => 'write',
1097 'contextlevel' => CONTEXT_COURSE
,
1099 'editingteacher' => CAP_ALLOW
,
1100 'admin' => CAP_ALLOW
1104 'moodle/my:manageblocks' => array(
1105 'captype' => 'write',
1106 'contextlevel' => CONTEXT_SYSTEM
,
1112 'moodle/notes:view' => array(
1113 'captype' => 'read',
1114 'contextlevel' => CONTEXT_SYSTEM
,
1116 'teacher' => CAP_ALLOW
,
1117 'editingteacher' => CAP_ALLOW
,
1118 'admin' => CAP_ALLOW
1122 'moodle/notes:manage' => array(
1123 'captype' => 'write',
1124 'contextlevel' => CONTEXT_SYSTEM
,
1126 'teacher' => CAP_ALLOW
,
1127 'editingteacher' => CAP_ALLOW
,
1128 'admin' => CAP_ALLOW
1132 'moodle/tag:manage' => array(
1133 'captype' => 'write',
1134 'contextlevel' => CONTEXT_SYSTEM
,
1136 'teacher' => CAP_ALLOW
,
1137 'editingteacher' => CAP_ALLOW
,
1138 'admin' => CAP_ALLOW
1142 'moodle/tag:create' => array(
1143 'captype' => 'write',
1144 'contextlevel' => CONTEXT_SYSTEM
,
1146 'admin' => CAP_ALLOW
,
1151 'moodle/tag:edit' => array(
1152 'captype' => 'write',
1153 'contextlevel' => CONTEXT_SYSTEM
,
1155 'admin' => CAP_ALLOW
,
1160 'moodle/tag:editblocks' => array(
1161 'captype' => 'write',
1162 'contextlevel' => CONTEXT_SYSTEM
,
1164 'teacher' => CAP_ALLOW
,
1165 'editingteacher' => CAP_ALLOW
,
1166 'admin' => CAP_ALLOW
1170 'moodle/block:view' => array(
1171 'captype' => 'read',
1172 'contextlevel' => CONTEXT_BLOCK
,
1174 'guest' => CAP_ALLOW
,
1175 'user' => CAP_ALLOW
,
1176 'student' => CAP_ALLOW
,
1177 'teacher' => CAP_ALLOW
,
1178 'editingteacher' => CAP_ALLOW
,
1179 'coursecreator' => CAP_ALLOW