original_string: protected static function remove_archived_user_competencies_in_plan($plan) {
          $competencies = $plan->get_competencies();
          $usercompetenciesplan = user_competency_plan::get_multiple($plan->get('userid'), $plan->get('id'), $competencies);
  
          foreach ($usercompetenciesplan as $ucpkey => $ucp) {
              $ucp->delete();
          }
      }
code: protected static function remove_archived_user_competencies_in_plan($plan) {
          $competencies = $plan->get_competencies();
          $usercompetenciesplan = user_competency_plan::get_multiple($plan->get('userid'), $plan->get('id'), $competencies);
  
          foreach ($usercompetenciesplan as $ucpkey => $ucp) {
              $ucp->delete();
          }
      }
code_tokens: protected static function remove_archived_user_competencies_in_plan ( $ plan ) { $ competencies = $ plan -> get_competencies ( ) ; $ usercompetenciesplan = user_competency_plan :: get_multiple ( $ plan -> get ( 'userid' ) , $ plan -> get ( 'id' ) , $ competencies ) ; foreach ( $ usercompetenciesplan as $ ucpkey => $ ucp ) { $ ucp -> delete ( ) ; } }
docstring: Delete archived user competencies in a plan.
  
  @param int $plan The plan object.
  @return void
docstring_tokens: Delete archived user competencies in a plan .