{% extends "project-base.html" %} {% load static %} {% load q %} {% block title %} {{title}} {% endblock %} {% block head %} {{block.super}} {% endblock %} {% block action_buttons %}
{% if not project.is_account_project or project.is_deletable %} {% endif %} {% if send_invitation.can_add_invitee_to_team %} {% endif %} {% if has_outputs %} {% endif %} {% if can_upgrade_app %} {% endif %} {% if authoring_tool_enabled %} {% endif %}
{# action buttons #} {% if action_buttons %} {% for q in action_buttons %}
{% if can_start_task and q.can_start_new_task %}
{% csrf_token %} {{q.question.spec.title}} »
{% else %} {{q.question.spec.title}} » {# use a stable title - dont make it depend on the task #} {% endif %}
{% endfor %} {% endif %} {% endblock %} {% block above_title %} {% if authoring_tool_enabled %}

You are in author mode. Authoring tools have been enabled for this module.

Edit App Add Question

{% endif %} {% endblock %} {% block body_content %} {% if project.root_task.module.spec.introduction %}

{{project.root_task.render_introduction|safe}}

{% endif %} {% if project.root_task.module.spec.is_app_stub %} {# This project is tied to an app that has not yet been imported. #}

Activate App

This app must be activated by an administrator of your organization. Send them an invitation to join this project. When they get here, they’ll be able to activate the app.

{% endif %}
{% with ncolumns=columns|length %} {% for column in columns %}
{% if column.title %}

{{column.title}}

{% endif %} {% for group in column.groups %}
{% if group.title %}

{{group.title}}

{% endif %}
{% for q in group.questions %}
{# The user may not have permission to actually start a Task, however. If not, show the same UI but without the form element that actually makes the request to start the Task. #} {% if can_start_task %} {# We need one of three forms here. If this is a module-type question and it's been answered already (it has a Task answer), then we simply link to that Task. Otherwise if it's not answered or if it's a module-set type quesion that can be answered multiple times, we show a form. If the question is answered by a particular module, clicking the icon submits a form that creates a new Task and redirects to it. If this question instead has a "protocol" field, then the user is simply redirected to the Apps Catalog and is presented with apps that satisfy the protocol. #} {% if not q.can_start_new_task %} {# This is a module-type question that has been started. Clicking the question doesn't start a new task --- instead, it's just a link to the started Task. #} {# Link to the Task. #} {% elif not q.question.spec.protocol %} {# Start a task directly using the module type in the specification. #}
{% csrf_token %} {% else %} {# Go to the Apps Catalog to select an app that implements the protocol specified on the question. #} {% endif %} {% endif %} {# Once again, different HTML depending on the layout mode being used. For rows, start a new Bootstrap row and put the icon in the first column div. #} {% if layout_mode == "rows" %}
{% endif %} {% if authoring_tool_enabled %} {# Pencil icon to edit this question. #}
{% endif %} {% if not q.hide_icon %}
{# Show a checkmark if the question has been answered, can only be answered once (i.e. is a module-type question), and its Task has been completed. #}
{% if not q.can_start_new_task and q.task.is_finished %} {% endif %}
{# Select and show an icon. #}
{% endif %} {# Once again, different HTML depending on the layout mode being used. For row mode, move to the second column for the question's title. #} {% if layout_mode == "rows" %}
{% endif %} {# The label for the icon is the title of the question in the question's specification. #}
{# If the question has been answered, can only be answered once (i.e. is a module-type question), and the question specification allows the use of Task's title as the label ('app_overrides_name_and_icon' is not set), then use it. #} {% if not q.can_start_new_task and q.question.spec.app_overrides_name_and_icon is None %} {{q.task.title}} {# Otherwise use the question's title as the label. #} {% else %} {% if q.can_start_new_task and q.question.spec.type == "module-set" %} {% endif %} {{q.question.spec.title}} {% endif %} {# In the rows layout mode, indicate the question's progress and show a button to start or continue the task #} {% if layout_mode != "grid" %} {% with task=q.task %}
{% if layout_mode == "rows" %} {% if task.is_finished %}
Finished
{% elif task.is_started %}
In progress
{% else %}
Start section
{% endif %} {% endif %} {% endwith %} {% endif %}
{# Once again, different HTML depending on the layout mode being used. For row mode, end the column and the row. #} {% if layout_mode == "rows" %}
{% endif %} {# If the user had permission to start a task and we started an 'a' or 'form' element, end it. #} {% if can_start_task %} {% if not q.can_start_new_task %}
{% else %}
{% endif %} {% endif %} {# Show invitations and discussions for this question below the icon and label. #}
{# Show open invitations related to this question. #} {% for inv in q.invitations %}

You invited {{inv.to_display}} {{inv.purpose}} on {{inv.created|date}}. (cancel)

{% endfor %} {# If the user is a guest participant in a discussion inside this question, link to this discussion. They can't view the task directly. (?) #} {% if q.discussions %}
Discussions:
{% for d in q.discussions %} {% endfor %}
{% endif %}
{% endfor %} {# question #}
{% endfor %} {# group #} {% comment %} {% if columns|length > 0 and column.groups|length == 0 %}

{% if column.has_tasks_on_left %} There are no tasks in this column yet. {% else %} There are no more tasks in this column. Congrats! {% endif %}

{% endif %} {% endcomment %}
{% endfor %} {# column #} {% endwith %}
{% endblock %} {% block modals %} {# SETTINGS MODAL #} {% if not project.is_account_project or project.is_deletable %} {# /project-settings #} {% 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 %} {% if authoring_tool_enabled %} {# show over modal #} {% endif %} {% endblock %}