original_string: 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();
      }
code: 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();
      }
code_tokens: 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 ( ) ; }
docstring: 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
docstring_tokens: Delete a cohort role assignment by id .