{% import "components/nothing.html" as nothing with context %} {% extends "layout/basic.html" %} {% block content %}

{{ _('Testdata') }}

{% if not reference and (handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM)) %} {{ _('Config') }} {% elif reference %} {{ _('Source') }} {% endif %}
{{ noscript_note.render() }} {% set filetype = "testdata" %} {% set can_edit = (handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM)) and not reference %} {% include "partials/problem_files.html" %} {% if not reference and (handler.user.own(pdoc) or handler.user.hasPerm(perm.PERM_READ_PROBLEM_DATA) or handler.user.hasPriv(PRIV.PRIV_READ_PROBLEM_DATA)) %}
{% if handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM) %} {% endif %}
{% endif %}
{% if not reference and (handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM)) %} {{ set(UiContext, { pdoc: pdoc }) }}

{{ _('Generate Testdata') }}(Beta)

{{ noscript_note.render() }}
{% if pdoc.config.type === 'default' %} {{ form.form_text({ columns: 12, label:'Data Generator', name:'gen', help_text:'A data generator is a program that generates testdata. It should output result to stdout.' }) }} {{ form.form_text({ columns: 12, label:'Standard Program', name:'std', help_text:'A standard program is a program that solves the problem. It should output answer to stdout.' }) }} {% else %} {{ nothing.render('Generate testdata is not supported for this problem type.') }} {% endif %}
{% endif %}

{{ _('Additional Files') }}

{% if (handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM)) and not reference %} {% endif %}
{% set filetype = "additional_file" %} {% set can_edit = (handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM)) and not reference %} {% include "partials/problem_files.html" %}
{% if (handler.user.own(pdoc, perm.PERM_EDIT_PROBLEM_SELF) or handler.user.hasPerm(perm.PERM_EDIT_PROBLEM)) and not reference %} {% endif %}
{% include "partials/problem_sidebar.html" %}
{% endblock %}