original_string: public static function add_competency_to_plan($planid, $competencyid) {
          $params = self::validate_parameters(self::add_competency_to_plan_parameters(), array(
              'planid' => $planid,
              'competencyid' => $competencyid,
          ));
  
          $plan = api::read_plan($params['planid']);
          self::validate_context($plan->get_context());
  
          return api::add_competency_to_plan($params['planid'], $params['competencyid']);
      }
code: public static function add_competency_to_plan($planid, $competencyid) {
          $params = self::validate_parameters(self::add_competency_to_plan_parameters(), array(
              'planid' => $planid,
              'competencyid' => $competencyid,
          ));
  
          $plan = api::read_plan($params['planid']);
          self::validate_context($plan->get_context());
  
          return api::add_competency_to_plan($params['planid'], $params['competencyid']);
      }
code_tokens: public static function add_competency_to_plan ( $ planid , $ competencyid ) { $ params = self :: validate_parameters ( self :: add_competency_to_plan_parameters ( ) , array ( 'planid' => $ planid , 'competencyid' => $ competencyid , ) ) ; $ plan = api :: read_plan ( $ params [ 'planid' ] ) ; self :: validate_context ( $ plan -> get_context ( ) ) ; return api :: add_competency_to_plan ( $ params [ 'planid' ] , $ params [ 'competencyid' ] ) ; }
docstring: add competency to a learning plan.
  
  @param int $planid Plan id.
  @param int $competencyid Competency id.
  @return int
docstring_tokens: add competency to a learning plan .