public function restart_preview_button() {
        global $OUTPUT;
        if ($this->is_preview() && $this->is_preview_user()) {
            return $OUTPUT->single_button(new moodle_url(
                    $this->start_attempt_url(), array('forcenew' => true)),
                    get_string('startnewpreview', 'quiz'));
        } else {
            return '';
        }
    }
public function restart_preview_button() {
        global $OUTPUT;
        if ($this->is_preview() && $this->is_preview_user()) {
            return $OUTPUT->single_button(new moodle_url(
                    $this->start_attempt_url(), array('forcenew' => true)),
                    get_string('startnewpreview', 'quiz'));
        } else {
            return '';
        }
    }
public function restart_preview_button ( ) { global $ OUTPUT ; if ( $ this -> is_preview ( ) && $ this -> is_preview_user ( ) ) { return $ OUTPUT -> single_button ( new moodle_url ( $ this -> start_attempt_url ( ) , array ( 'forcenew' => true ) ) , get_string ( 'startnewpreview' , 'quiz' ) ) ; } else { return '' ; } }
Print the HTML for the start new preview button, if the current user
is allowed to see one.
Print the HTML for the start new preview button if the current user is allowed to see one .