{% extends "base.html" %} {% import "icons.html" as icon %} {% import "player.html" as player %} {% block title %}{{ exercise.title }}{% endblock %} {% block styles %} {% endblock %} {% block body_attributes %} data-exercise="{{ exercise.identifier }}" data-type="{{ exercise.type }}"{% endblock %} {% block header %} {# Where the student is: a dot per item, then the end. A dot says how its item went, and a click on it goes there. #} {% if exercise.type == "shadowing" %} {# The takes of the sentence on screen, and how often it was heard. #}

{{ icon.mic() }}0 {{ icon.headphones() }}0

{% endif %} {% endblock %} {% block content %} {% set reading = exercise.text or exercise.media %}
{# What every item is about, kept beside them from one to the next. #} {% if reading %} {% endif %}
{% if exercise.instructions %}

{{ exercise.instructions }}

{% endif %}
{% for item in items %} {% set index = loop.index0 %} {# One item per screen. An answered item is rebuilt from what the student sent, and how it went: they find it as they left it, with the right answer beside a wrong one. #}
{% if item.instruction %}

{{ item.instruction }}

{% endif %}
{% if item.media and exercise.type != "shadowing" %} {% with media = item.media, size = "big" %} {% include "media.html" %} {% endwith %} {% endif %} {% if exercise.type == "gap-fill" %} {# Only the spaces written in the prompt: l'___ and و___ stay joined to their blank. #}

{%- for segment in item.segments -%} {{ segment }} {%- if not loop.last -%} {%- endif -%} {%- endfor -%}

{% elif exercise.type == "mcq" %}

{{ item.prompt }}

{# Short options, as minimal pairs have, are tiles to hit; longer ones are rows to read. #} {% set tiles = item.options and item.options|length <= 4 and item.options|map("length")|max <= 10 %}
    {% for option in item.options %}
  • {% endfor %}
{% elif exercise.type == "matching" %} {% if item.prompt %}

{{ item.prompt }}

{% endif %}
    {% for entry in item.left %}
  • {{ entry }} {# Every entry is in each place, unseen and stacked, so that a place is as wide as the widest of them, empty or filled. #}
  • {% endfor %}
    {% for choice in item.choices %}
  • {% endfor %}
{% elif exercise.type == "ordering" %} {% if item.prompt %}

{{ item.prompt }}

{% endif %} {# The sentence is built from its start, on the right in a language written right to left. #}
{% for segment in item.shuffled %} {% endfor %}
{% elif exercise.type == "shadowing" %} {# Heard first, read if wanted: blurred, so that it shows how many words there are and not which, and a click shows it. #} {# The sound is played by the page rather than by an
{% endfor %} {# The end: nothing to send, every answer is already in the file. What is left is how it went, and the items still open. #}
{% endblock %} {% block footer %} {# One button to press next, always in the same place: βœ“ while the item holds an answer not yet checked, β†’ otherwise. β†’ never stands beside an answer that was not checked, so it cannot be taken for sending it. #} {% endblock %} {% block scripts %} {% endblock %}