: // // component_name should be the same as the directory name of the mod or block. // // Core moodle capabilities are defined thus: // moodle/: // // Examples: mod/forum:viewpost // block/recent_activity:view // moodle/site:deleteuser // // The variable name for the capability definitions array follows the format // $__capabilities // // For the core capabilities, the variable is $moodle_capabilities. $moodle_capabilities = array( 'moodle/site:doanything' => array( 'captype' => 'admin', 'contextlevel' => CONTEXT_SYSTEM ), 'moodle/legacy:guest' => array( 'captype' => 'legacy', 'contextlevel' => CONTEXT_SYSTEM ), 'moodle/legacy:student' => array( 'captype' => 'legacy', 'contextlevel' => CONTEXT_SYSTEM ), 'moodle/legacy:teacher' => array( 'captype' => 'legacy', 'contextlevel' => CONTEXT_SYSTEM ), 'moodle/legacy:editingteacher' => array( 'captype' => 'legacy', 'contextlevel' => CONTEXT_SYSTEM ), 'moodle/legacy:coursecreator' => array( 'captype' => 'legacy', 'contextlevel' => CONTEXT_SYSTEM ), 'moodle/legacy:admin' => array( 'captype' => 'legacy', 'contextlevel' => CONTEXT_SYSTEM ), 'moodle/site:config' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/site:readallmessages' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/site:approvecourse' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/site:import' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/site:backup' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/site:restore' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/site:manageblocks' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/site:accessallgroups' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/site:viewfullnames' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/site:viewreports' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/site:trustcontent' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/user:create' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/user:delete' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/user:update' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/user:viewdetails' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/role:assign' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/role:override' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/role:manage' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/role:unassignself' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => (empty($CFG->allowunenrol)) ? CAP_PREVENT : CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/category:create' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSECAT, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/category:delete' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSECAT, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/category:update' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSECAT, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/category:visibility' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSECAT, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/course:create' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/course:delete' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/course:update' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:view' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:viewhiddenuserfields' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:viewhiddencourses' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:visibility' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:managefiles' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:managequestions' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:manageactivities' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:activityvisibility' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:viewhiddenactivities' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:viewparticipants' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:viewscales' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:managescales' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:managegroups' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:reset' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/blog:view' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/blog:create' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/blog:manageofficialtags' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/blog:managepersonaltags' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/blog:manageentries' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/calendar:manageownentries' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/calendar:manageentries' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), // The next 3 might make no sense for some roles, e.g teacher, etc. // since the next level up is site. These are more for the parent role 'moodle/user:readuserposts' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_USERID, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/user:readuserblogs' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_USERID, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/user:viewuseractivitiesreport' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_USERID, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/user:editprofile' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_USERID, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_PREVENT, 'coursecreator' => CAP_PREVENT, 'admin' => CAP_ALLOW ) ), 'moodle/question:import' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/question:export' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/question:managecategory' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/question:manage' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/site:doclinks' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:sectionvisibility' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:viewhiddensections' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:setcurrentsection' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:viewcoursegrades' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/course:managegrades' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, 'teacher' => CAP_PREVENT, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), 'moodle/user:viewusergrades' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ) ); ?>