<?xml version="1.0"?>
<t name="Survey: finished" t-name="survey.survey_fill_form_done">
        <div class="wrap">
            <div class="o_survey_finished mt32 mb32">
                <h1>Thank you!</h1>
                <div t-field="survey.description_done" class="oe_no_empty"/>
                <div class="row">
                    <div class="col">
                        <t t-if="survey.scoring_type != 'no_scoring' and survey.scoring_success_min">
                            <div>You scored <t t-esc="answer.scoring_percentage"/>%</div>
                            <t t-if="answer.scoring_success">
                                <div>Congratulations, you have passed the test!</div>

                                <div t-if="survey.certification" class="mt16 mb16">
                                    <a role="button" class="btn btn-primary btn-lg" t-att-href="'/survey/%s/get_certification' % survey.id">
                                        <i class="fa fa-fw fa-trophy" role="img" aria-label="Download certification" title="Download certification"/>
                                        Download certification
                                    </a>
                                </div>
                            </t>
                            <t t-else="">
                                <div>Unfortunately, you have failed the test.</div>
                            </t>
                        </t>
                        <t t-call="survey.survey_button_retake"/>
                        <div t-if="survey.scoring_type != 'scoring_without_answers'" class="o_survey_review">
                            If you wish, you can <a t-att-href="'/survey/print/%s?answer_token=%s&amp;review=True' % (survey.access_token, answer.access_token)">review your answers</a>
                        </div>
                    </div>
                    <div class="col-6 text-center" t-if="survey.certification_give_badge and answer.scoring_success">
                        <img t-att-src="'/web/image/gamification.badge/%s/image_128' % survey.certification_badge_id.id"/>
                        <div>You received the badge <span class="fw-bold" t-esc="survey.certification_badge_id.name"/>!</div>
                    </div>
                </div>
            </div>
            <div class="o_survey_result p-4 col-12 row" t-if="graph_data">
                <div t-if="survey.page_ids" class="survey_graph col-lg-6 d-none d-md-block" data-graph-type="by_section" t-att-data-graph-data="graph_data">
                    <canvas id="by_section_chart"/>
                </div>
                <div t-attf-class="survey_graph col-lg-6 #{'offset-lg-3' if not survey.page_ids else ''}" data-graph-type="doughnut" t-att-data-graph-data="graph_data">
                    <canvas id="doughnut_chart"/>
                </div>
            </div>
        </div>
    </t>

    