public static function get_descendants_ids($competency) {
        global $DB;

        $path = $DB->sql_like_escape($competency->get('path') . $competency->get('id') . '/') . '%';
        $like = $DB->sql_like('path', ':likepath');
        return $DB->get_fieldset_select(self::TABLE, 'id', $like, array('likepath' => $path));
    }