original_string: public static function remove_related_competency($competencyid, $relatedcompetencyid) {
          static::require_enabled();
          $competency = new competency($competencyid);
  
          // This only check if we have the permission in either competency because both competencies
          // should belong to the same framework.
          require_capability('moodle/competency:competencymanage', $competency->get_context());
  
          $relatedcompetency = related_competency::get_relation($competencyid, $relatedcompetencyid);
          if ($relatedcompetency->get('id')) {
              return $relatedcompetency->delete();
          }
  
          return false;
      }
code: public static function remove_related_competency($competencyid, $relatedcompetencyid) {
          static::require_enabled();
          $competency = new competency($competencyid);
  
          // This only check if we have the permission in either competency because both competencies
          // should belong to the same framework.
          require_capability('moodle/competency:competencymanage', $competency->get_context());
  
          $relatedcompetency = related_competency::get_relation($competencyid, $relatedcompetencyid);
          if ($relatedcompetency->get('id')) {
              return $relatedcompetency->delete();
          }
  
          return false;
      }
code_tokens: public static function remove_related_competency ( $ competencyid , $ relatedcompetencyid ) { static :: require_enabled ( ) ; $ competency = new competency ( $ competencyid ) ; // This only check if we have the permission in either competency because both competencies // should belong to the same framework. require_capability ( 'moodle/competency:competencymanage' , $ competency -> get_context ( ) ) ; $ relatedcompetency = related_competency :: get_relation ( $ competencyid , $ relatedcompetencyid ) ; if ( $ relatedcompetency -> get ( 'id' ) ) { return $ relatedcompetency -> delete ( ) ; } return false ; }
docstring: Remove a related competency.
  
  @param int $competencyid The id of the competency.
  @param int $relatedcompetencyid The id of the related competency.
  @return bool True when it was deleted, false when it wasn't or the relation doesn't exist.
docstring_tokens: Remove a related competency .