{% load i18n %}
{% spaceless %}
<div id="oa_rubric_editor_wrapper" class="oa_editor_content_wrapper">
    <div id="openassessment_criterion_template" class="is--hidden">
        {% include "openassessmentblock/edit/oa_edit_criterion.html" with criterion_name="" criterion_label="" criterion_prompt="" criterion_options=False criterion_feedback="disabled" %}
    </div>

    <div id="openassessment_option_template" class="is--hidden">
        {% include "openassessmentblock/edit/oa_edit_option.html" with option_name="" option_label="" option_points=1 option_explanation="" %}
    </div>

    <div id="openassessment_rubric_instructions" class="openassessment_tab_instructions">
        <p class="openassessment_description">
            {% trans "Rubrics are made up of criteria, which usually contain one or more options. Each option has a point value. This template contains two sample criteria and their options. Replace the sample text with your own text. For more information, see the ORA documentation." %}
        </p>
    </div>

    <ul id="openassessment_criterion_list" >
        {% for criterion in criteria %}
            {% include "openassessmentblock/edit/oa_edit_criterion.html" with criterion_name=criterion.name criterion_label=criterion.label criterion_prompt=criterion.prompt criterion_options=criterion.options criterion_feedback=criterion.feedback %}
        {% endfor %}
    </ul>

    <div id="openassessment_rubric_add_criterion" class="openassessment_container_add_button">
        <h6>
            {% trans "Add Criterion" %}
        </h6>
    </div>

    <div id="openassessment_rubric_feedback_wrapper" class="wrapper-comp-settings">
        <div id="openassessment_rubric_feedback_header">
            <span>{% trans "Feedback for This Response" %}</span>
        </div>
        <ul class="list-input settings-list">
            <li class="field comp-setting-entry">
                <div class="wrapper-comp-setting" id="openassessment_rubric_feedback_input_wrapper">
                    <label for="openassessment_rubric_feedback" class="setting-label">{% trans "Feedback Instructions" %}</label>
                    <textarea id="openassessment_rubric_feedback" class="input setting-input">{{ feedbackprompt }}</textarea>
                </div>
                <p class="setting-help">
                    {% trans "Encourage learners to provide feedback on the response they have graded. You can replace the sample text with your own." %}
                </p>
            </li>
            <li class="field comp-setting-entry">
                <div class="wrapper-comp-setting" id="openassessment_rubric_feedback_default_text_input_wrapper">
                    <label for="openassessment_rubric_feedback_default_text" class="setting-label"> {% trans "Default Feedback Text" %}</label>
                        <textarea id="openassessment_rubric_feedback_default_text" class="input setting-input">{{ feedback_default_text }}</textarea>
                </div>
                <p class="setting-help">
                    {% trans "Enter feedback text that learners will see before they enter their own feedback. Use this text to show learners a good example peer assessment." %}
                </p>
            </li>

        </ul>
    </div>
</div>
{% endspaceless %}
