original_string: public static function read_competency($id) {
          global $PAGE;
  
          $params = self::validate_parameters(self::read_competency_parameters(), array(
              'id' => $id,
          ));
  
          $competency = api::read_competency($params['id']);
          $context = $competency->get_context();
          self::validate_context($context);
          $output = $PAGE->get_renderer('core');
          $exporter = new competency_exporter($competency, array('context' => $context));
          $record = $exporter->export($output);
          return $record;
      }
code: public static function read_competency($id) {
          global $PAGE;
  
          $params = self::validate_parameters(self::read_competency_parameters(), array(
              'id' => $id,
          ));
  
          $competency = api::read_competency($params['id']);
          $context = $competency->get_context();
          self::validate_context($context);
          $output = $PAGE->get_renderer('core');
          $exporter = new competency_exporter($competency, array('context' => $context));
          $record = $exporter->export($output);
          return $record;
      }
code_tokens: public static function read_competency ( $ id ) { global $ PAGE ; $ params = self :: validate_parameters ( self :: read_competency_parameters ( ) , array ( 'id' => $ id , ) ) ; $ competency = api :: read_competency ( $ params [ 'id' ] ) ; $ context = $ competency -> get_context ( ) ; self :: validate_context ( $ context ) ; $ output = $ PAGE -> get_renderer ( 'core' ) ; $ exporter = new competency_exporter ( $ competency , array ( 'context' => $ context ) ) ; $ record = $ exporter -> export ( $ output ) ; return $ record ; }
docstring: Read a competency by id.
  
  @param int $id The id of the competency
  @return \stdClass
docstring_tokens: Read a competency by id .