{% extends "base.html" %}

{% block scripts %}
  {{ super() }}
  <script type="text/javascript" src="{{ url_for('static', filename='task.js') }}"></script>
  <script>
    Judicious.taskUUID = "{{ id }}";
  </script>
{% endblock %}

{% block body %}
  {% block task %}
  {% endblock %}
  {% if session.get("JUDICIOUS_MTURK", False) %}
    <form name='mturk_form' method='post' id='mturk_form' action='{{ session.get("JUDICIOUS_MTURK_SUBMIT_TO") }}/mturk/externalSubmit'>
      <input type='hidden' value='' name='assignmentId' id='assignmentId'/>
      <input class="button" type="submit" value="Submit" id="submit-to-mturk">
    </form>
  {% else %}
    <form>
      <a class="button" id="submit-task" href="#">Submit</a>
      <input class="button button-clear" type="submit" value="Skip" id="skip-task">
      <div class="task-id"><p><code>{{ id }}</code></p></div>
    </form>
  {% endif %}
{% endblock %}

{% extends "base.html" %}

{% block scripts %}
  {{ super() }}
  <script type="text/javascript" src="{{ url_for('static', filename='task.js') }}"></script>
  <script>
    Judicious.taskUUID = "{{ id }}";
  </script>
{% endblock %}

{% block body %}
  {% block task %}
  {% endblock %}
  {% if session.get("JUDICIOUS_MTURK", False) %}
    <form name='mturk_form' method='post' id='mturk_form' action='{{ session.get("JUDICIOUS_MTURK_SUBMIT_TO") }}/mturk/externalSubmit'>
      <input type='hidden' value='{{ session['assignmentId'] }}' name='assignmentId' id='assignmentId'/>
      <input class="button" type="submit" value="Submit" id="submit-to-mturk">
    </form>
  {% else %}
    <form>
      <a class="button" id="submit-task" href="#">Submit</a>
      <input class="button button-clear" type="submit" value="Skip" id="skip-task">
      <div class="task-id"><p><code>{{ id }}</code></p></div>
    </form>
  {% endif %}
{% endblock %}

Add assignmentId to form via session
Add assignmentId to form via session
