original_string: public static function get_multiple_relations($competencyids) {
          global $DB;
  
          if (empty($competencyids)) {
              return array();
          }
  
          list($insql, $params) = $DB->get_in_or_equal($competencyids);
  
          $records = $DB->get_records_select(self::TABLE,
                                              "competencyid $insql OR relatedcompetencyid $insql",
                                              array_merge($params, $params)
                                              );
  
          $relatedcompetencies = array();
          foreach ($records as $record) {
              unset($record->id);
              $relatedcompetencies[] = new related_competency(null, $record);
          }
          return $relatedcompetencies;
      }
code: public static function get_multiple_relations($competencyids) {
          global $DB;
  
          if (empty($competencyids)) {
              return array();
          }
  
          list($insql, $params) = $DB->get_in_or_equal($competencyids);
  
          $records = $DB->get_records_select(self::TABLE,
                                              "competencyid $insql OR relatedcompetencyid $insql",
                                              array_merge($params, $params)
                                              );
  
          $relatedcompetencies = array();
          foreach ($records as $record) {
              unset($record->id);
              $relatedcompetencies[] = new related_competency(null, $record);
          }
          return $relatedcompetencies;
      }
code_tokens: public static function get_multiple_relations ( $ competencyids ) { global $ DB ; if ( empty ( $ competencyids ) ) { return array ( ) ; } list ( $ insql , $ params ) = $ DB -> get_in_or_equal ( $ competencyids ) ; $ records = $ DB -> get_records_select ( self :: TABLE , "competencyid $insql OR relatedcompetencyid $insql" , array_merge ( $ params , $ params ) ) ; $ relatedcompetencies = array ( ) ; foreach ( $ records as $ record ) { unset ( $ record -> id ) ; $ relatedcompetencies [ ] = new related_competency ( null , $ record ) ; } return $ relatedcompetencies ; }
docstring: Get the related competencies from competency ids.
  
  @param  int[] $competencyids Array of competency ids.
  @return related_competency[]
docstring_tokens: Get the related competencies from competency ids .