original_string: public static function get_user_competency_by_id($usercompetencyid) {
          static::require_enabled();
          $uc = new user_competency($usercompetencyid);
          if (!$uc->can_read()) {
              throw new required_capability_exception($uc->get_context(), 'moodle/competency:usercompetencyview',
                  'nopermissions', '');
          }
          return $uc;
      }
code: public static function get_user_competency_by_id($usercompetencyid) {
          static::require_enabled();
          $uc = new user_competency($usercompetencyid);
          if (!$uc->can_read()) {
              throw new required_capability_exception($uc->get_context(), 'moodle/competency:usercompetencyview',
                  'nopermissions', '');
          }
          return $uc;
      }
code_tokens: public static function get_user_competency_by_id ( $ usercompetencyid ) { static :: require_enabled ( ) ; $ uc = new user_competency ( $ usercompetencyid ) ; if ( ! $ uc -> can_read ( ) ) { throw new required_capability_exception ( $ uc -> get_context ( ) , 'moodle/competency:usercompetencyview' , 'nopermissions' , '' ) ; } return $ uc ; }
docstring: Get a user competency by ID.
  
  @param int $usercompetencyid The user competency ID.
  @return user_competency
docstring_tokens: Get a user competency by ID .