public static function delete_cohort_role_assignment($id) {
        $cohortroleassignment = new cohort_role_assignment($id);
        $context = context_system::instance();

        // First we do a permissions check.
        require_capability('moodle/role:manage', $context);

        // OK - all set.
        return $cohortroleassignment->delete();
    }
public static function delete_cohort_role_assignment($id) {
        $cohortroleassignment = new cohort_role_assignment($id);
        $context = context_system::instance();

        // First we do a permissions check.
        require_capability('moodle/role:manage', $context);

        // OK - all set.
        return $cohortroleassignment->delete();
    }
public static function delete_cohort_role_assignment ( $ id ) { $ cohortroleassignment = new cohort_role_assignment ( $ id ) ; $ context = context_system :: instance ( ) ; // First we do a permissions check. require_capability ( 'moodle/role:manage' , $ context ) ; // OK - all set. return $ cohortroleassignment -> delete ( ) ; }
Delete a cohort role assignment by id.

Requires moodle/role:manage capability at the system context.

@param int $id The record to delete. This will also remove this role from the user for all users in the system.
@return boolean
Delete a cohort role assignment by id .