{% load i18n %}
{% spaceless %}

    <div
      class="staff__grade__form"
      data-submission-uuid="{{ submission.uuid }}"
      data-team-submission="{{ teams_enabled|default:"False" }}"
      data-team-name="{{ team_name|default:"" }}"
      data-team-usernames="{{ team_usernames|default:"" }}"
    >
        <div class="wrapper--staff-assessment">
            <div>
                {% if teams_enabled %}
                  <p>{% trans "Give this team a grade using the problem's rubric." %}</p>
                {% else %}
                  <p>{% trans "Give this learner a grade using the problem's rubric." %}</p>
                {% endif %}
            </div>

            <div>
                <article class="staff-assessment">
                    <div class="staff-assessment__display">
                        <header class="staff-assessment__display__header">
                            <h4 class="staff-assessment__display__title">
                                {% if teams_enabled %}
                                    {% blocktrans %}
                                        Response for: {{ team_name }} with {{ team_usernames }}
                                    {% endblocktrans %}
                                {% elif student_username %}
                                    {% blocktrans %}
                                        Response for: {{ student_username }}
                                    {% endblocktrans %}
                                {% else %}
                                    {% trans "Learner Response" %}
                                {% endif %}
                            </h4>
                        </header>
                        {% if teams_enabled %}
                          {% trans "The teams's response to the prompt above" as translated_label %}
                        {% else %}
                          {% trans "The learner's response to the prompt above" as translated_label %}
                        {% endif %}
                        {% include "openassessmentblock/oa_submission_answer.html" with answer=submission.answer answer_text_label=translated_label %}

                        {% trans "Associated Files" as translated_header %}
                        {% include "openassessmentblock/oa_uploaded_file.html" with file_upload_type=file_upload_type file_urls=staff_file_urls header=translated_header class_prefix="staff-assessment" show_warning="true" including_template="staff_grade_learners_assessment" xblock_id=xblock_id %}
                    </div>

                    <form class="staff-assessment__assessment" method="post">
                        {% include "openassessmentblock/oa_rubric.html" with rubric_type="staff-full-grade" %}
                    </form>
                </article>
            </div>

            <div>
                <div class="message message--inline message--error message--error-server" tabindex="-1">
                    <h5 class="message__title">{% trans "We could not submit your assessment" %}</h5>
                    <div class="message__content"></div>
                </div>

                <ul class="list list--actions">
                    <li class="list--actions__item submit_assessment--action">
                        <button type="submit" class="action action--submit" disabled>
                            {% trans "Submit assessment" %}
                        </button>
                    </li>

                    <li class="list--actions__item submit_assessment--action">
                        <button type="submit" class="action action--submit continue_grading--action" disabled>
                            {% trans "Submit assessment and continue grading" %}
                        </button>
                    </li>
                </ul>
                <div class="staff-grade-error"></div>
            </div>
        </div>
    </div>
{% endspaceless %}

