original_string: public function get_ancestors() {
          global $DB;
          $ancestors = array();
          $ancestorsids = explode('/', trim($this->get('path'), '/'));
          // Drop the root item from the array /0/.
          array_shift($ancestorsids);
          if (!empty($ancestorsids)) {
              list($insql, $params) = $DB->get_in_or_equal($ancestorsids, SQL_PARAMS_NAMED);
              $ancestors = self::get_records_select("id $insql", $params);
          }
          return $ancestors;
      }
code: public function get_ancestors() {
          global $DB;
          $ancestors = array();
          $ancestorsids = explode('/', trim($this->get('path'), '/'));
          // Drop the root item from the array /0/.
          array_shift($ancestorsids);
          if (!empty($ancestorsids)) {
              list($insql, $params) = $DB->get_in_or_equal($ancestorsids, SQL_PARAMS_NAMED);
              $ancestors = self::get_records_select("id $insql", $params);
          }
          return $ancestors;
      }
code_tokens: public function get_ancestors ( ) { global $ DB ; $ ancestors = array ( ) ; $ ancestorsids = explode ( '/' , trim ( $ this -> get ( 'path' ) , '/' ) ) ; // Drop the root item from the array /0/. array_shift ( $ ancestorsids ) ; if ( ! empty ( $ ancestorsids ) ) { list ( $ insql , $ params ) = $ DB -> get_in_or_equal ( $ ancestorsids , SQL_PARAMS_NAMED ) ; $ ancestors = self :: get_records_select ( "id $insql" , $ params ) ; } return $ ancestors ; }
docstring: Get competency ancestors.
  
  @return competency[] Return array of ancestors.
docstring_tokens: Get competency ancestors .