{% extends "univ_oahpa.html" %} {% load i18n %} {% load trans_to %} {% load staticfiles %} {% get_current_language as LANGUAGE_CODE %} {% block extrajs %} {% if courses_user %} {% endif %} {% endblock %} {% block content %}
{% ifnotequal gametype "sahka" %} {% ifnotequal gametype "sahka_main" %}

{% block gamename %}{% endblock %}

{% block instructions %}{% endblock %}

{% if courses_user %} {% include "courses_goal_progress.html" %} {% endif %} {% 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 }} {% endif %} {% for detail, value in form.qattrs.items %} {% endfor %} {% for detail, value in form.aattrs.items %} {% endfor %} {% if gametype != "sahka" or form.utterance and form.utterance_type == "question" %} {% 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 %} {% if form.error == "error" and gametype != "sahka" %} {{ form.userans }} {% else %} ________________{# Blank answer, this gets hidden via CSS in leksa and morfa, but not morfac #} {% endif %} {% 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 %} {{ form.answer }} {% if form.pron_imp %}{{ form.pron_imp }}{% endif %} {% endifnotequal %} {% if form.answertext2 %}{{ form.answertext2 }}{% endif %} {% endif %} {# if show_correct #} {% ifequal form.error "error" %} {% if form.feedback %} {% else %} {# constraining this to a specific flag, just for testing. #} {% comment %} {% if form.errorapi_feedback %} {% else %} {% endif %} {% endcomment %} {% ifnotequal gametype "leksa" %} {% trans_to "help" "sme"%} {% endifnotequal %} {% if form.tcomm %} {% trans_to "This is almost correct!" "sme" %} {% endif %} {% endif %} {% endifequal %} {% endif %} {# if form.answer #} {% else %} {% if form.utterance_type == "opening" or form.utterance_type == "closing" %} {# the opening/closing of sahka dialogue #}
{% endif %} {% endif %} {# game not sahka or (non-empty sahka form and utterance type question) #} {% ifnotequal gametype "sahka" %} {% 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 %} {% endifnotequal %} {{ form.word_id }} {{ form.conneg }} {{ 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 %}
{% endfor %} {# form in forms #}
{% block submit %} {% if not all_correct %} {% if not show_correct %} {% endif %} {% ifequal count 1 %} {% endifequal %} {% endif %} {% endblock %}
{% if 1 %} {% if all_correct %} {% trans_to "Congratulations!" "sme" %}
{% endif %} {% if score %} {% trans_to "Your score:" "sme" %} {{ score }} {% endif %} {% endif %}
{% if comment %}
{{ comment }} {% endif %}
{% endblock %}