protected function render_mod_scorm_attempt_bar(mod_scorm_attempt_bar $attemptbar) {
        $output = '';
        $attemptbar = clone($attemptbar);
        $attemptbar->prepare($this, $this->page, $this->target);

        if (count($attemptbar->attemptids) > 1) {
            $output .= get_string('attempt', 'scorm') . ':';

            if (!empty($attemptbar->previouslink)) {
                $output .= '&#160;(' . $attemptbar->previouslink . ')&#160;';
            }

            foreach ($attemptbar->attemptlinks as $link) {
                $output .= "&#160;&#160;$link";
            }

            if (!empty($attemptbar->nextlink)) {
                $output .= '&#160;&#160;(' . $attemptbar->nextlink . ')';
            }
        }

        return html_writer::tag('div', $output, array('class' => 'paging'));
    }