{% set title = 'Edit topic' %} {% extends "base.html" %} {% import "parts/form.html" as f %} {% import "parts/navigation.html" as nav %} {% block body %}

{{ g.course.name }}

{{ nav.course_menu('topic') }} {% if copy_topic != None %}

Create copy of topic

{% elif edit_topic != None %} {{ nav.topic_menu('edit-topic') }} {% else %}

New topic

{% endif %}
{{ form.csrf_token }} {{ f.field(form, 'rank', 'numeric sorting key') }} {{ f.field(form, 'ident', 'identifier in URL, unique within course') }} {{ f.field(form, 'title') }} {{ f.field(form, 'type') }} {{ f.field_label(form, 'deadline') }}
{{ form.deadline() }} {% if auto_deadline != None %}
{% endif %} {{ f.field_help(form, 'deadline', 'in local time zone (if your browser does not support datetime widgets, enter yyyy-mm-ddThh:mm)') }} {{ f.field(form, 'max_points') }} {{ f.field(form, 'binary_result', 'display only accept (non-zero points) / reject (0 points)') }} {{ f.field(form, 'standalone', 'do not include in total sum of points') }} {% if is_guinea_pig() %} {{ f.field(form, 'auto_eval', 'URL of an external services used for automatic evaluation of this topic') }} {{ f.field(form, 'custom_attrs', 'custom attributes available via API (in JSON)') }} {% endif %} {% if form.public.data %} {{ f.field(form, 'public', 'topic is visible to students') }} {% else %} {{ f.field(form, 'public', 'topic is visible to students; use “Save and publish“ to change this', disabled=True) }} {% endif %}

{{ form.submit(class='ok', accesskey='s') }} {% if edit_topic != None %} {{ form.publish(class='ok', disabled=edit_topic.public, title='Publish the topic and notify students.') }} {% endif %} Cancel {% if edit_topic != None %}

{{ form.delete(class='danger') }}  (including {{ post_count }} posts) {% endif %}

{% endblock %}