original_string: public static function read_evidence($evidenceid) {
          static::require_enabled();
  
          $evidence = new evidence($evidenceid);
          $uc = new user_competency($evidence->get('usercompetencyid'));
          if (!$uc->can_read()) {
              throw new required_capability_exception($uc->get_context(), 'moodle/competency:usercompetencyview',
                  'nopermissions', '');
          }
  
          return $evidence;
      }
code: public static function read_evidence($evidenceid) {
          static::require_enabled();
  
          $evidence = new evidence($evidenceid);
          $uc = new user_competency($evidence->get('usercompetencyid'));
          if (!$uc->can_read()) {
              throw new required_capability_exception($uc->get_context(), 'moodle/competency:usercompetencyview',
                  'nopermissions', '');
          }
  
          return $evidence;
      }
code_tokens: public static function read_evidence ( $ evidenceid ) { static :: require_enabled ( ) ; $ evidence = new evidence ( $ evidenceid ) ; $ uc = new user_competency ( $ evidence -> get ( 'usercompetencyid' ) ) ; if ( ! $ uc -> can_read ( ) ) { throw new required_capability_exception ( $ uc -> get_context ( ) , 'moodle/competency:usercompetencyview' , 'nopermissions' , '' ) ; } return $ evidence ; }
docstring: Read an evidence.
  @param int $evidenceid The evidence ID.
  @return evidence
docstring_tokens: Read an evidence .