public function get_progress_bar() {
        global $PAGE;

        $stage = self::STAGE_COMPLETE;
        $currentstage = $this->stage->get_stage();
        $items = array();
        while ($stage > 0) {
            $classes = array('backup_stage');
            if (floor($stage / 2) == $currentstage) {
                $classes[] = 'backup_stage_next';
            } else if ($stage == $currentstage) {
                $classes[] = 'backup_stage_current';
            } else if ($stage < $currentstage) {
                $classes[] = 'backup_stage_complete';
            }
            $item = array('text' => strlen(decbin($stage)).'. '.get_string('currentstage'.$stage, 'backup'), 'class' => join(' ', $classes));
            if ($stage < $currentstage && $currentstage < self::STAGE_COMPLETE && (!self::$skipcurrentstage || ($stage * 2) != $currentstage)) {
                $params = $this->stage->get_params();
                if (empty($params)) {
                    $params = array();
                }
                $params = array_merge($params, array('backup' => $this->get_backupid(), 'stage' => $stage));
                $item['link'] = new moodle_url($PAGE->url, $params);
            }
            array_unshift($items, $item);
            $stage = floor($stage / 2);
        }
        return $items;
    }