{% extends "oahpa.html" %} {% load i18n %} {% get_current_language as LANGUAGE_CODE %} {% block extrajs %} {% endblock %} {% block content %} {% ifnotequal gametype "sahka" %} {% ifnotequal gametype "sahka_main" %}

{% block gamename %}{% endblock %}

{% block instructions %}{% endblock %}

{% block tooltips %}
{% for form in forms %} {% block tooltip %} {% endblock %} {% endfor %} {# Feedback messages #} {% for form in forms %} {% ifequal form.error "error" %} {% if form.feedback %} {% include 'feedback_tooltip.html' %} {% endif %} {% endifequal %} {% endfor %}
{% endblock %}
{% endifnotequal %} {% endifnotequal %}
{% for form in forms %}
{% block question %}{% endblock %}
{# TODO: Switch rendering of tooltip to a different loop in a different block? #} {% if gametype == "sahka" and not form.utterance %} {{ form.utterance_id }} {% for detail, value in form.qattrs.items %} {% endfor %} {% for detail, value in form.aattrs.items %} {% endfor %} {% else %}
{% if form.answer %} {# Show which answers are correct if "show correct" is pressed, else show a form#} {% if show_correct %} {% if form.answertext1 %}{{ form.answertext1 }}{% endif %} {% if form.pron %}{{ form.pron }}{% endif %} {% ifequal form.error "correct" %} {{ form.userans }} {% else %} {% ifequal form.error "error" %} {{ form.userans }} {% else %} ________________{# Blank answer, this gets hidden via CSS in leksa and morfa, but not morfac #} {% endifequal %} {% endifequal %} {% if form.pron_imp %} {{ form.pron_imp }} {% endif %} {% if form.answertext2 %}{{ form.answertext2 }}{% endif %} {% else %} {# If just test answers, mark correct answers as green #} {% if form.answertext1 %}{{ form.answertext1 }}{% endif %} {% ifnotequal form.userans "" %} {% if form.pron %}{{ form.pron }}{% endif %} {% ifequal form.error "correct" %} {{ form.userans }} {% else %} {{ form.answer }} {% endifequal %} {% if form.pron_imp %} {{ form.pron_imp }} {% endif %} {% else %} {% if form.pron %}{{ form.pron }}{% endif %} {% if gametype != "sahka" or forloop.last %} {{ form.answer }} {% endif %} {% if form.pron_imp %} {{ form.pron_imp }} {% endif %} {% endifnotequal %} {% if form.answertext2 %}{{ form.answertext2 }}{% endif %} {% endif %} {% ifequal form.error "error" %} {% if not show_correct %} {% if form.feedback %} {% endif %} {% else %} {% if form.tcomm %}{% trans "This is almost correct!" %}{% endif %} {% endif %} {% endifequal %} {% endif %} {% if show_correct %} {% ifnotequal form.error "correct" %} {{ form.correct_answers }} {% else %} {# Parens around correct, non-relaxed form. #} {% ifequal form.is_relaxed "relaxed" %} ({{ form.correct_answers }}) {{ form.relaxed }} {% endifequal %} {% endifnotequal %} {% endif %} {{ form.word_id }} {{ form.tag_id }} {{ form.question_id }} {{ form.answer_id }} {{ form.utterance_id }} {{ form.qstring }} {{ form.astring }} {% block hidden %}{% endblock %} {% for detail, value in form.qattrs.items %} {% endfor %} {% for detail, value in form.aattrs.items %} {% endfor %}
{% endif %} {# empty sahka form #} {% endfor %}
{% block submit %} {# {% if not all_correct %} make it possible to see the correct stress markings even if the word form without stress markings was accepted #} {% if not show_correct %} {% endif %} {% ifequal count 1 %} {% endifequal %} {# {% endif %} #} {% endblock %}
{% if 1 %} {% if all_correct %} {% trans "Congratulations!" %}
{% endif %} {% if score %} {% trans "Your score:" %} {{ score }} {% endif %} {% endif %}
{% if comment %}
{{ comment }} {% endif %} {% ifnotequal gametype "sahka" %} {% ifnotequal gametype "sahka_main" %} {% endifnotequal %} {% endifnotequal %} {% ifnotequal gametype "sahka" %} {% ifnotequal gametype "sahka_main" %} {% endifnotequal %} {% endifnotequal %}
{% endblock %}