{% load i18n %}
{% spaceless %}
<li id="openassessment__leaderboard" class="openassessment__steps__step step--leaderboard is--complete {% if allow_latex %} allow--latex{% endif %}">
    <header class="step__header">
        <h2 class="step__title">
            <span class="wrapper--copy">
                <span class="step__label">{% trans "Top Responses" %} </span>
                <div class="wrapper--step__content">
                    <h3 class="leaderboard__title">{% trans "Top-Scoring Responses for This Assignment" %}</h3>
                    <ol class="list leaderboard__score__list">
                    {% for topscore in topscores %}
                        <li class="leaderboard__score__item">
                            <h4 class="leaderboard__list__number">{{ forloop.counter }}</h4>
                            {% with num_points=topscore.score %}
                            <h4 class="leaderboard__score__title">
                                {% blocktrans %}{{ num_points }} points{% endblocktrans %}
                            </h4>
                            {% endwith %}
                            <div class="leaderboard__answer">
                                {% if topscore.file %}
                                <img class="leaderboard__score__image" alt="{% trans "The image associated with your peer's submission." %}" src="{{ topscore.file }}" />
                                {% endif %}
                                {% include "openassessmentblock/oa_submission_answer.html" with answer=topscore.submission.answer answer_text_label="Your peer's response to the question above:" %}
                            </div>
                        </li>
                    {% endfor %}
                    </ol>
                </div>
            </span>
        </h2>
    </header>
</li>
{% endspaceless %}
