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;
    }
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;
    }
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 ; }
Get competency ancestors.

@return competency[] Return array of ancestors.
Get competency ancestors .