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 | RISK_DATALOSS
,
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 | RISK_DATALOSS
,
96 'captype' => 'legacy',
97 'contextlevel' => CONTEXT_SYSTEM
101 'moodle/site:config' => array(
103 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS
,
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_SPAM
,
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_COURSE
,
154 'editingteacher' => CAP_ALLOW
,
159 'moodle/site:backup' => array(
161 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS
,
163 'captype' => 'write',
164 'contextlevel' => CONTEXT_COURSE
,
166 'editingteacher' => CAP_ALLOW
,
171 'moodle/site:restore' => array(
173 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS
,
175 'captype' => 'write',
176 'contextlevel' => CONTEXT_COURSE
,
178 'editingteacher' => CAP_ALLOW
,
183 'moodle/site:manageblocks' => array(
185 'riskbitmask' => RISK_SPAM | RISK_XSS
,
187 'captype' => 'write',
188 'contextlevel' => CONTEXT_BLOCK
,
190 'editingteacher' => CAP_ALLOW
,
195 'moodle/site:accessallgroups' => array(
198 'contextlevel' => CONTEXT_COURSE
,
200 'teacher' => CAP_ALLOW
,
201 'editingteacher' => CAP_ALLOW
,
206 'moodle/site:viewfullnames' => array(
209 'contextlevel' => CONTEXT_COURSE
,
211 'teacher' => CAP_ALLOW
,
212 'editingteacher' => CAP_ALLOW
,
217 'moodle/site:viewreports' => array(
219 'riskbitmask' => RISK_PERSONAL
,
222 'contextlevel' => CONTEXT_COURSE
,
224 'teacher' => CAP_ALLOW
,
225 'editingteacher' => CAP_ALLOW
,
230 'moodle/site:trustcontent' => array(
232 'riskbitmask' => RISK_XSS
,
234 'captype' => 'write',
235 'contextlevel' => CONTEXT_COURSE
,
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
, RISK_DATALOSS
,
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_COURSE
,
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_COURSE
,
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 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS
,
350 'captype' => 'write',
351 'contextlevel' => CONTEXT_COURSE
,
353 'editingteacher' => CAP_ALLOW
,
358 'moodle/role:override' => array(
360 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS
,
362 'captype' => 'write',
363 'contextlevel' => CONTEXT_COURSE
,
369 'moodle/role:safeoverride' => array(
371 'riskbitmask' => RISK_SPAM
,
373 'captype' => 'write',
374 'contextlevel' => CONTEXT_COURSE
,
376 'editingteacher' => CAP_ALLOW
380 'moodle/role:manage' => array(
382 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS
,
384 'captype' => 'write',
385 'contextlevel' => CONTEXT_SYSTEM
,
391 'moodle/role:unassignself' => array(
393 'captype' => 'write',
394 'contextlevel' => CONTEXT_COURSE
,
396 'student' => (empty($CFG->allowunenrol
)) ? CAP_INHERIT
: CAP_ALLOW
,
397 'teacher' => CAP_ALLOW
,
398 'editingteacher' => CAP_ALLOW
,
399 'coursecreator' => CAP_ALLOW
,
404 'moodle/role:viewhiddenassigns' => array(
407 'contextlevel' => CONTEXT_COURSE
,
409 'teacher' => CAP_ALLOW
,
410 'editingteacher' => CAP_ALLOW
,
415 'moodle/role:switchroles' => array(
417 'riskbitmask' => RISK_XSS | RISK_PERSONAL
,
420 'contextlevel' => CONTEXT_COURSE
,
422 'editingteacher' => CAP_ALLOW
,
427 'moodle/category:create' => array(
429 'riskbitmask' => RISK_XSS
,
431 'captype' => 'write',
432 'contextlevel' => CONTEXT_COURSECAT
,
438 'moodle/category:delete' => array(
440 'riskbitmask' => RISK_DATALOSS
,
442 'captype' => 'write',
443 'contextlevel' => CONTEXT_COURSECAT
,
449 'moodle/category:update' => array(
451 'riskbitmask' => RISK_XSS
,
453 'captype' => 'write',
454 'contextlevel' => CONTEXT_COURSECAT
,
460 'moodle/category:visibility' => array(
462 'captype' => 'write',
463 'contextlevel' => CONTEXT_COURSECAT
,
469 'moodle/course:create' => array(
471 'riskbitmask' => RISK_XSS
,
473 'captype' => 'write',
474 'contextlevel' => CONTEXT_COURSECAT
,
476 'coursecreator' => CAP_ALLOW
,
481 'moodle/course:delete' => array(
483 'riskbitmask' => RISK_DATALOSS
,
485 'captype' => 'write',
486 'contextlevel' => CONTEXT_COURSE
,
492 'moodle/course:update' => array(
494 'riskbitmask' => RISK_XSS
,
496 'captype' => 'write',
497 'contextlevel' => CONTEXT_COURSE
,
499 'editingteacher' => CAP_ALLOW
,
504 'moodle/course:view' => array(
507 'contextlevel' => CONTEXT_COURSE
,
509 'guest' => CAP_ALLOW
,
510 'student' => CAP_ALLOW
,
511 'teacher' => CAP_ALLOW
,
512 'editingteacher' => CAP_ALLOW
516 'moodle/course:bulkmessaging' => array(
518 'riskbitmask' => RISK_SPAM
,
520 'captype' => 'write',
521 'contextlevel' => CONTEXT_COURSE
,
523 'teacher' => CAP_ALLOW
,
524 'editingteacher' => CAP_ALLOW
,
529 'moodle/course:viewhiddenuserfields' => array(
531 'riskbitmask' => RISK_PERSONAL
,
534 'contextlevel' => CONTEXT_COURSE
,
536 'teacher' => CAP_ALLOW
,
537 'editingteacher' => CAP_ALLOW
,
542 'moodle/course:viewhiddencourses' => array(
545 'contextlevel' => CONTEXT_COURSE
,
547 'coursecreator' => CAP_ALLOW
,
548 'teacher' => CAP_ALLOW
,
549 'editingteacher' => CAP_ALLOW
,
554 'moodle/course:visibility' => array(
556 'captype' => 'write',
557 'contextlevel' => CONTEXT_COURSE
,
563 'moodle/course:managefiles' => array(
565 'riskbitmask' => RISK_XSS
,
567 'captype' => 'write',
568 'contextlevel' => CONTEXT_COURSE
,
570 'editingteacher' => CAP_ALLOW
,
575 'moodle/course:manageactivities' => array(
577 'riskbitmask' => RISK_XSS
,
579 'captype' => 'write',
580 'contextlevel' => CONTEXT_COURSE
,
582 'editingteacher' => CAP_ALLOW
,
587 'moodle/course:managemetacourse' => array(
589 'riskbitmask' => RISK_XSS | RISK_PERSONAL
,
591 'captype' => 'write',
592 'contextlevel' => CONTEXT_COURSE
,
594 'editingteacher' => CAP_ALLOW
,
599 'moodle/course:activityvisibility' => array(
601 'captype' => 'write',
602 'contextlevel' => CONTEXT_COURSE
,
604 'editingteacher' => CAP_ALLOW
,
609 'moodle/course:viewhiddenactivities' => array(
611 'captype' => 'write',
612 'contextlevel' => CONTEXT_COURSE
,
614 'teacher' => CAP_ALLOW
,
615 'editingteacher' => CAP_ALLOW
,
620 'moodle/course:viewparticipants' => array(
623 'contextlevel' => CONTEXT_COURSE
,
625 'student' => CAP_ALLOW
,
626 'teacher' => CAP_ALLOW
,
627 'editingteacher' => CAP_ALLOW
,
632 'moodle/site:viewparticipants' => array(
635 'contextlevel' => CONTEXT_SYSTEM
,
641 'moodle/course:viewscales' => array(
644 'contextlevel' => CONTEXT_COURSE
,
646 'student' => CAP_ALLOW
,
647 'teacher' => CAP_ALLOW
,
648 'editingteacher' => CAP_ALLOW
,
653 'moodle/course:managescales' => array(
655 'captype' => 'write',
656 'contextlevel' => CONTEXT_COURSE
,
658 'editingteacher' => CAP_ALLOW
,
663 'moodle/course:managegroups' => array(
665 'captype' => 'write',
666 'contextlevel' => CONTEXT_COURSE
,
668 'editingteacher' => CAP_ALLOW
,
673 'moodle/course:reset' => array(
675 'riskbitmask' => RISK_DATALOSS
,
677 'captype' => 'write',
678 'contextlevel' => CONTEXT_COURSE
,
680 'editingteacher' => CAP_ALLOW
,
685 'moodle/blog:view' => array(
688 'contextlevel' => CONTEXT_COURSE
,
690 'guest' => CAP_ALLOW
,
692 'student' => CAP_ALLOW
,
693 'teacher' => CAP_ALLOW
,
694 'editingteacher' => CAP_ALLOW
,
699 'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only
701 'riskbitmask' => RISK_SPAM
,
703 'captype' => 'write',
704 'contextlevel' => CONTEXT_SYSTEM
,
711 'moodle/blog:manageentries' => array(
713 'riskbitmask' => RISK_SPAM
,
715 'captype' => 'write',
716 'contextlevel' => CONTEXT_COURSE
,
718 'teacher' => CAP_ALLOW
,
719 'editingteacher' => CAP_ALLOW
,
724 'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only
726 'riskbitmask' => RISK_SPAM
,
728 'captype' => 'write',
729 'contextlevel' => CONTEXT_COURSE
,
736 'moodle/calendar:managegroupentries' => array(
738 'riskbitmask' => RISK_SPAM
,
740 'captype' => 'write',
741 'contextlevel' => CONTEXT_COURSE
,
743 'teacher' => CAP_ALLOW
,
744 'editingteacher' => CAP_ALLOW
,
749 'moodle/calendar:manageentries' => array(
751 'riskbitmask' => RISK_SPAM
,
753 'captype' => 'write',
754 'contextlevel' => CONTEXT_COURSE
,
756 'teacher' => CAP_ALLOW
,
757 'editingteacher' => CAP_ALLOW
,
762 'moodle/user:editprofile' => array(
764 'riskbitmask' => RISK_SPAM | RISK_PERSONAL
,
766 'captype' => 'write',
767 'contextlevel' => CONTEXT_USER
,
773 'moodle/user:editownprofile' => array(
775 'riskbitmask' => RISK_SPAM
,
777 'captype' => 'write',
778 'contextlevel' => CONTEXT_SYSTEM
,
780 'guest' => CAP_PROHIBIT
,
786 'moodle/user:changeownpassword' => array(
788 'captype' => 'write',
789 'contextlevel' => CONTEXT_SYSTEM
,
791 'guest' => CAP_PROHIBIT
,
797 // The next 3 might make no sense for some roles, e.g teacher, etc.
798 // since the next level up is site. These are more for the parent role
799 'moodle/user:readuserposts' => array(
802 'contextlevel' => CONTEXT_USER
,
804 'student' => CAP_ALLOW
,
805 'teacher' => CAP_ALLOW
,
806 'editingteacher' => CAP_ALLOW
,
811 'moodle/user:readuserblogs' => array(
814 'contextlevel' => CONTEXT_USER
,
816 'student' => CAP_ALLOW
,
817 'teacher' => CAP_ALLOW
,
818 'editingteacher' => CAP_ALLOW
,
823 'moodle/user:viewuseractivitiesreport' => array(
826 'contextlevel' => CONTEXT_USER
,
828 'teacher' => CAP_ALLOW
,
829 'editingteacher' => CAP_ALLOW
,
834 'moodle/question:managecategory' => array(
835 'riskbitmask' => RISK_SPAM | RISK_XSS
,
836 'captype' => 'write',
837 'contextlevel' => CONTEXT_COURSE
,
839 'editingteacher' => CAP_ALLOW
,
845 'moodle/question:add' => array(
846 'riskbitmask' => RISK_SPAM | RISK_XSS
,
847 'captype' => 'write',
848 'contextlevel' => CONTEXT_COURSE
,
850 'editingteacher' => CAP_ALLOW
,
853 'clonepermissionsfrom' => 'moodle/question:manage'
855 'moodle/question:editmine' => array(
856 'riskbitmask' => RISK_SPAM | RISK_XSS
,
857 'captype' => 'write',
858 'contextlevel' => CONTEXT_COURSE
,
860 'editingteacher' => CAP_ALLOW
,
863 'clonepermissionsfrom' => 'moodle/question:manage'
865 'moodle/question:editall' => array(
866 'riskbitmask' => RISK_SPAM | RISK_XSS
,
867 'captype' => 'write',
868 'contextlevel' => CONTEXT_COURSE
,
870 'editingteacher' => CAP_ALLOW
,
873 'clonepermissionsfrom' => 'moodle/question:manage'
875 'moodle/question:viewmine' => array(
877 'contextlevel' => CONTEXT_COURSE
,
879 'editingteacher' => CAP_ALLOW
,
882 'clonepermissionsfrom' => 'moodle/question:manage'
884 'moodle/question:viewall' => array(
886 'contextlevel' => CONTEXT_COURSE
,
888 'editingteacher' => CAP_ALLOW
,
891 'clonepermissionsfrom' => 'moodle/question:manage'
893 'moodle/question:usemine' => array(
895 'contextlevel' => CONTEXT_COURSE
,
897 'editingteacher' => CAP_ALLOW
,
900 'clonepermissionsfrom' => 'moodle/question:manage'
902 'moodle/question:useall' => array(
904 'contextlevel' => CONTEXT_COURSE
,
906 'editingteacher' => CAP_ALLOW
,
909 'clonepermissionsfrom' => 'moodle/question:manage'
911 'moodle/question:movemine' => array(
912 'captype' => 'write',
913 'contextlevel' => CONTEXT_COURSE
,
915 'editingteacher' => CAP_ALLOW
,
918 'clonepermissionsfrom' => 'moodle/question:manage'
920 'moodle/question:moveall' => array(
921 'captype' => 'write',
922 'contextlevel' => CONTEXT_COURSE
,
924 'editingteacher' => CAP_ALLOW
,
927 'clonepermissionsfrom' => 'moodle/question:manage'
929 //END new in moodle 1.9
931 // Configure the installed question types.
932 'moodle/question:config' => array(
933 'riskbitmask' => RISK_CONFIG
,
934 'captype' => 'write',
935 'contextlevel' => CONTEXT_SYSTEM
,
941 'moodle/site:doclinks' => array(
944 'contextlevel' => CONTEXT_SYSTEM
,
946 'teacher' => CAP_ALLOW
,
947 'editingteacher' => CAP_ALLOW
,
952 'moodle/course:sectionvisibility' => array(
954 'captype' => 'write',
955 'contextlevel' => CONTEXT_COURSE
,
957 'editingteacher' => CAP_ALLOW
,
962 'moodle/course:useremail' => array(
964 'captype' => 'write',
965 'contextlevel' => CONTEXT_COURSE
,
967 'editingteacher' => CAP_ALLOW
,
972 'moodle/course:viewhiddensections' => array(
974 'captype' => 'write',
975 'contextlevel' => CONTEXT_COURSE
,
977 'editingteacher' => CAP_ALLOW
,
982 'moodle/course:setcurrentsection' => array(
984 'captype' => 'write',
985 'contextlevel' => CONTEXT_COURSE
,
987 'editingteacher' => CAP_ALLOW
,
992 'moodle/site:mnetlogintoremote' => array(
993 'riskbitmask' => RISK_PERSONAL | RISK_XSS
,
995 'contextlevel' => CONTEXT_SYSTEM
,
1001 'moodle/grade:viewall' => array(
1002 'riskbitmask' => RISK_PERSONAL
,
1003 'captype' => 'read',
1004 'contextlevel' => CONTEXT_COURSE
, // and CONTEXT_USER
1006 'teacher' => CAP_ALLOW
,
1007 'editingteacher' => CAP_ALLOW
,
1008 'admin' => CAP_ALLOW
1010 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
1013 'moodle/grade:view' => array(
1014 'captype' => 'read',
1015 'contextlevel' => CONTEXT_COURSE
,
1017 'student' => CAP_ALLOW
1021 'moodle/grade:viewhidden' => array(
1022 'riskbitmask' => RISK_PERSONAL
,
1023 'captype' => 'read',
1024 'contextlevel' => CONTEXT_COURSE
,
1026 'teacher' => CAP_ALLOW
,
1027 'editingteacher' => CAP_ALLOW
,
1028 'admin' => CAP_ALLOW
1030 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
1033 'moodle/grade:import' => array(
1034 'riskbitmask' => RISK_PERSONAL | RISK_XSS
,
1035 'captype' => 'write',
1036 'contextlevel' => CONTEXT_COURSE
,
1038 'editingteacher' => CAP_ALLOW
,
1039 'admin' => CAP_ALLOW
1041 'clonepermissionsfrom' => 'moodle/course:managegrades'
1044 'moodle/grade:export' => array(
1045 'riskbitmask' => RISK_PERSONAL
,
1046 'captype' => 'read',
1047 'contextlevel' => CONTEXT_COURSE
,
1049 'teacher' => CAP_ALLOW
,
1050 'editingteacher' => CAP_ALLOW
,
1051 'admin' => CAP_ALLOW
1053 'clonepermissionsfrom' => 'moodle/course:managegrades'
1056 'moodle/grade:manage' => array(
1057 'riskbitmask' => RISK_PERSONAL | RISK_XSS
,
1058 'captype' => 'write',
1059 'contextlevel' => CONTEXT_COURSE
,
1061 'editingteacher' => CAP_ALLOW
,
1062 'admin' => CAP_ALLOW
1064 'clonepermissionsfrom' => 'moodle/course:managegrades'
1067 'moodle/grade:edit' => array(
1068 'riskbitmask' => RISK_PERSONAL | RISK_XSS
,
1069 'captype' => 'write',
1070 'contextlevel' => CONTEXT_COURSE
,
1072 'editingteacher' => CAP_ALLOW
,
1073 'admin' => CAP_ALLOW
1075 'clonepermissionsfrom' => 'moodle/course:managegrades'
1078 'moodle/grade:manageoutcomes' => array(
1079 'captype' => 'write',
1080 'contextlevel' => CONTEXT_COURSE
,
1082 'editingteacher' => CAP_ALLOW
,
1083 'admin' => CAP_ALLOW
1085 'clonepermissionsfrom' => 'moodle/course:managegrades'
1088 'moodle/grade:manageletters' => array(
1089 'captype' => 'write',
1090 'contextlevel' => CONTEXT_COURSE
,
1092 'editingteacher' => CAP_ALLOW
,
1093 'admin' => CAP_ALLOW
1095 'clonepermissionsfrom' => 'moodle/course:managegrades'
1098 'moodle/grade:hide' => array(
1099 'captype' => 'write',
1100 'contextlevel' => CONTEXT_COURSE
,
1102 'editingteacher' => CAP_ALLOW
,
1103 'admin' => CAP_ALLOW
1107 'moodle/grade:lock' => array(
1108 'captype' => 'write',
1109 'contextlevel' => CONTEXT_COURSE
,
1111 'editingteacher' => CAP_ALLOW
,
1112 'admin' => CAP_ALLOW
1116 'moodle/grade:unlock' => array(
1117 'captype' => 'write',
1118 'contextlevel' => CONTEXT_COURSE
,
1120 'editingteacher' => CAP_ALLOW
,
1121 'admin' => CAP_ALLOW
1125 'moodle/my:manageblocks' => array(
1126 'captype' => 'write',
1127 'contextlevel' => CONTEXT_SYSTEM
,
1133 'moodle/notes:view' => array(
1134 'captype' => 'read',
1135 'contextlevel' => CONTEXT_COURSE
,
1137 'teacher' => CAP_ALLOW
,
1138 'editingteacher' => CAP_ALLOW
,
1139 'admin' => CAP_ALLOW
1143 'moodle/notes:manage' => array(
1144 'riskbitmask' => RISK_SPAM
,
1146 'captype' => 'write',
1147 'contextlevel' => CONTEXT_COURSE
,
1149 'teacher' => CAP_ALLOW
,
1150 'editingteacher' => CAP_ALLOW
,
1151 'admin' => CAP_ALLOW
1155 'moodle/tag:manage' => array(
1156 'riskbitmask' => RISK_SPAM
,
1158 'captype' => 'write',
1159 'contextlevel' => CONTEXT_SYSTEM
,
1161 'teacher' => CAP_ALLOW
,
1162 'editingteacher' => CAP_ALLOW
,
1163 'admin' => CAP_ALLOW
1167 'moodle/tag:create' => array(
1168 'riskbitmask' => RISK_SPAM
,
1170 'captype' => 'write',
1171 'contextlevel' => CONTEXT_SYSTEM
,
1173 'admin' => CAP_ALLOW
,
1178 'moodle/tag:edit' => array(
1179 'riskbitmask' => RISK_SPAM
,
1181 'captype' => 'write',
1182 'contextlevel' => CONTEXT_SYSTEM
,
1184 'admin' => CAP_ALLOW
,
1189 'moodle/tag:editblocks' => array(
1190 'captype' => 'write',
1191 'contextlevel' => CONTEXT_SYSTEM
,
1193 'teacher' => CAP_ALLOW
,
1194 'editingteacher' => CAP_ALLOW
,
1195 'admin' => CAP_ALLOW
1199 'moodle/block:view' => array(
1200 'captype' => 'read',
1201 'contextlevel' => CONTEXT_BLOCK
,
1203 'guest' => CAP_ALLOW
,
1204 'user' => CAP_ALLOW
,
1205 'student' => CAP_ALLOW
,
1206 'teacher' => CAP_ALLOW
,
1207 'editingteacher' => CAP_ALLOW
,
1208 'coursecreator' => CAP_ALLOW