{% load i18n %}
{% spaceless %}
<div id="openassessment__message__{{ xblock_id }}" class="openassessment__message message">
    <h4 class="message__title">{% trans "Status" %}</h4>
    <div class="message__content">
        <p>
            {% if training %}
                {% if training_deadline_approaching %}
                    {% trans "This assignment is in progress. Learner training will close soon. Complete the learner training step to move on." %}
                {% else %}
                    {% trans "This assignment is in progress. Complete the learner training step to move on." %}
                {% endif %}
            {% elif self %}
                {% if self_not_released %}
                    {% trans "This assignment is in progress. Check back later when the assessment period has started." %}
                {% else %}
                    {% with start_link='<a data-behavior="ui-scroll" href="#openassessment__self-assessment__'|add:xblock_id|add:'">'|safe %}
                        {% with start_strong='<strong>'|safe end_strong='</strong>'|safe end_link='</a>'|safe %}
                            {% if self_approaching %}
                                {% blocktrans %}
                                    {{ start_strong }}This assignment is in progress. The self assessment step will close soon.{{ end_strong }} You still need to complete the {{ start_link }}self assessment{{ end_link }} step.
                                {% endblocktrans %}
                            {% else %}
                                {% blocktrans %}
                                    This assignment is in progress. You still need to complete the {{ start_link }}self assessment{{ end_link }} step.
                                {% endblocktrans %}
                            {% endif %}
                        {% endwith %}
                    {% endwith %}
                {% endif %}
            {% elif peer %}
                {% if peer_not_released %}
                    {% trans "This assignment is in progress. Check back later when the assessment period has started." %}
                {% else %}
                    {% with start_link='<a data-behavior="ui-scroll" href="#openassessment__peer-assessment__'|add:xblock_id|add:'">'|safe%}
                        {% with start_strong='<strong>'|safe end_strong='</strong>'|safe end_link='</a>'|safe %}
                            {% if peer_approaching and peer_not_available %}
                                {% blocktrans %}
                                    This assignment is in progress.{{ start_strong }}The peer assessment step will close soon.{{ end_strong }} All submitted peer responses have been assessed. Check back later to see if more learners have submitted responses. You still need to complete the {{ start_link }}peer assessment{{ end_link }} step.
                                {% endblocktrans %}
                            {% elif not peer_approaching and peer_not_available %}
                                {% blocktrans %}
                                    This assignment is in progress. All submitted peer responses have been assessed. Check back later to see if more learners have submitted responses. You still need to complete the {{ start_link }}peer assessment{{ end_link }} step.
                                {% endblocktrans %}
                            {% elif peer_approaching and not peer_not_available %}
                                {% blocktrans %}
                                    This assignment is in progress. {{ start_strong }}The peer assessment step will close soon.{{ end_strong }} You still need to complete the {{ start_link }}peer assessment{{ end_link }} step.
                                {% endblocktrans %}
                            {% else %}
                                {% blocktrans %}
                                    This assignment is in progress. You still need to complete the {{ start_link }}peer assessment{{ end_link }} step.
                                {% endblocktrans %}
                            {% endif %}
                        {% endwith %}
                    {% endwith %}
                {% endif %}
            {% endif %}
        </p>
    </div>
</div>
{% endspaceless %}
