'clonepermissionsfrom' => 'moodle/category:visibility'
),
+ // create, delete, move cohorts in system and course categories,
+ // (cohorts with component !== null can be only moved)
+ 'moodle/cohort:manage' => array(
+
+ 'captype' => 'write',
+ 'contextlevel' => CONTEXT_COURSECAT,
+ 'legacy' => array(
+ 'manager' => CAP_ALLOW
+ )
+ ),
+
+ // add and remove cohort members (only for cohorts where component !== null)
+ 'moodle/cohort:assign' => array(
+
+ 'captype' => 'write',
+ 'contextlevel' => CONTEXT_COURSECAT,
+ 'legacy' => array(
+ 'manager' => CAP_ALLOW
+ )
+ ),
+
+ // view members of a cohort, this can be used in course context too,
+ // this also controls the ability to actually use cohort
+ 'moodle/cohort:view' => array(
+
+ 'captype' => 'read',
+ 'contextlevel' => CONTEXT_COURSE,
+ 'legacy' => array(
+ 'editingteacher' => CAP_ALLOW,
+ 'manager' => CAP_ALLOW
+ )
+ ),
+
'moodle/course:create' => array(
'riskbitmask' => RISK_XSS,