{% extends "task-base.html" %} {% load static %} {% load q %} {% block title %} Next Question: {{q.spec.title}} | {{task.title}} {% endblock %} {% block head %} {% if q.spec.type == "longtext" %} {% endif %} {{block.super}} {% endblock %} {% block body %} {{block.super}}
{% if source_invitation %}
{% endif %}

{{title|safe}}

{{prompt|safe}}
{# ADDITIONAL INFORMATION BELOW THE PROMPT #} {% if example_answers %} {% endif %} {% if reference_text %}

Additional information...

{% endif %} {# THE QUESTION FORM WIDGETS #} {% if q.spec.type == "text" or q.spec.type == "email-address" or q.spec.type == "url" %}

{% if q.spec.help %} {{q.spec.help}} {% elif q.spec.type == "email-address" %} Enter an email address. {% elif q.spec.type == "url" %} Paste a web address. {% endif %}

{% elif q.spec.type == "password" %}
{# we don't provide the old value as a default to protect secrets #}

{{q.spec.help}}

{% elif q.spec.type == "longtext" %}
{# dont flicker content before widget is added #} {% if answer %}{{answer|safe}} {% elif default_answer %}{{default_answer|safe}}{% endif %}

{{q.spec.help}}

{% elif q.spec.type == "date" %} {# The HTML5 date input type is only properly supported on Chrome, so we don't use it yet. Other browsers just show a text box, and we expect YYYY-MM-DD format, which is hard for users to enter manually. #}
{# filled in by script, actual value submitted #}

{{q.spec.help}}

{% elif q.spec.type == "choice" %}
{% for choice in q.spec.choices %}
{% endfor %}
{% elif q.spec.type == "yesno" %}

{{q.spec.help}}

{% elif q.spec.type == "multiple-choice" %}
{% for choice in q.spec.choices %}
{% endfor %} {% if q.spec.min > 0 and q.spec.min == q.spec.max %}

You must choose exactly {{q.spec.min}} option{{q.spec.min|pluralize}}.

{% elif q.spec.min > 0 %}

You must choose at least {{q.spec.min}} {% if q.spec.max %}and at most {{q.spec.max}}{% endif %} option{{q.spec.min|pluralize}}.

{% elif q.spec.max %}

You may choose at most {{q.spec.max}} option{{q.spec.max|pluralize}}.

{% endif %}
{% elif q.spec.type == "integer" or q.spec.type == "real" %}
{% comment %} The HTML5 number input is a bit confusing in how it handles periods and commas. Browsers seem to currently only support a period or comma as a decimal separator, depending on the lang attribute on the input or HTML. They do not allow thousands-commas. But we should let users type that in. {% endcomment %} {% if q.spec.min > -1000 and q.spec.max < 1000 %} {# the range doesn't admit thousands, so we don't need to worry about thousands-commmas #} {% else %} {# to let users enter thousands-commas by using a plain text field #} {% endif %}

{{q.spec.help}}

{% if q.spec.min|default_if_none:"NONE" != "NONE" and q.spec.max|default_if_none:"NONE" != "NONE" %}

Enter a number from {{q.spec.min}} to {{q.spec.max}}.

{% elif q.spec.min|default_if_none:"NONE" != "NONE" %}

Enter a number at least {{q.spec.min}}.

{% elif q.spec.max|default_if_none:"NONE" != "NONE" %}

Enter a number at most {{q.spec.max}}.

{% endif %}
{% elif q.spec.type == "file" %} {# When there is an existing answer, the UI shows a thumbnail of it. If the user doesn't choose a new file, the existing value is kept. #} {% if answer %}

The following file is uploaded:

{{answer_rendered|safe}}

Select a new file if you would like to replace it:

{% endif %}

{{q.spec.help}}

{% elif q.spec.type == "module" and answer_tasks|length == 0 %} {# The user must choose or start a module, but there is nothing to choose from, so show a simplified interface. #}

You will next begin the module {{answer_module.title}}.

{# must be a radio so the client-side validation passes, but we hide it #} {% elif q.spec.type == "module" %} {% with current_answer=answer_obj.answered_by_task.first %} {% for m in answer_tasks %}
{% endfor %}

{{q.spec.help}}

{% endwith %} {% elif q.spec.type == "interstitial" %} {# no other content but an empty value #} {% else %}

QUESTION TYPE NOT IMPLEMENTED: {{q.spec.type}}

{% endif %} {% if not is_answerable %}

This question cannot currently be answered or skipped because its value is currently being imputed or it is dependent on questions that have not yet been answered.

{% elif write_priv %} {% if q.spec.type != "interstitial" %} {# Interstitial questions do not offer these options because the user is just acknowledging the page and not providing an answer. #}
{% if not hidden_button_ids or "no-idea" not in hidden_button_ids %} {% endif %} {% if not hidden_button_ids or "not-applicable" not in hidden_button_ids %} {% endif %} {# Meta-options like starting a discussion or changing the editor of this question. Interstitial questions do not offer these and individuals here as a discussion guest dont get it either. #} {% if not is_discussion_guest and q.spec.type != "interstitial" %} {% if not task.project.is_account_project %} {# discussions can't be tied to answers of tasks that aren't in a project #} {% endif %} {% if task.can_transfer_owner and write_priv %} {% endif %} {% endif %}
{% endif %}
{# Buttons to save or skip this question #}
{# This is DEBUG functionality for reverting a question to an un-answered state, which differs from being answered but with null via the Skip/Clear button. #} {% if answer_obj and DEBUG %} {% endif %}
{# /.pull-left #}
{% if answer_obj and can_review %} {% endif %} {% else %} {# write_priv #} {# User does not have write permission so cannot answer the question, start a discussion, or change the editor. But we instead still want to show the review state. #} {% if answer_obj %} {% for key, label in review_choices %} {% if answer_obj.reviewed == key %}

This question’s review status is {{label}}.

{% endif %} {% endfor %} {% endif %} {% endif %} {# write_priv #}
{% include "discussion/discussion.html" %}
    {% if context %}

    Progress:

    {% include "task-progress-question-list.html" with previous="question" %}
  • ·
  • ·
  • ·
  • ...and we’re done
  • {% endif %}
{% if authoring_tool_enabled %}
Authoring Tool
{% endif %}
{% if authoring_tool_enabled %} {# should be in body so that it comes before the global error modal so that ajax errors show on top of this #} {% include "authoring-tool-modal.html" %} {% endif %} {% endblock %} {% block scripts %} {% include "task-question-debug-links.html" %} {% if q.spec.type == "longtext" %} {% endif %} {% if authoring_tool_enabled %} {# show over modal #} {% endif %} {% endblock %}