{% import "macro/reevaluation_buttons.html" as macro_reevaluation_buttons %} {% import 'macro/pages.html' as macro_pages %} {% macro rows(admin, url, page_url, submissions, page, pages, dataset=none) -%} {# Render a table of submission data. admin (Admin): the logged in admin. url (Url): the URL instance referring to the root of AWS. page_url (Url): the URL instance referring to the page displaying the table. submissions ([Submissions]): the list of submissions to display in the table (current page only). page (int): 0-based number of the current page. pages (int): total number of pages. dataset (Dataset|None): the dataset to show results for, or if not defined use the active one. #} {% if pages == 0 %}

No submissions found.

{% else %} {{ macro_pages.selector(page_url, page, pages) }} {% for s in submissions|sort(attribute="timestamp")|reverse %} {{ row(admin, url, s, dataset) }} {% endfor %}
Time User Task Status Files Token Official Comment Reevaluate
{% endif %} {%- endmacro %} {% macro row(admin, url, s, dataset=None) -%} {# Render a table's row containing a submission data. admin (Admin): the logged in admin. url (Url): the URL instance referring to the root of AWS. s (Submission): the submission to render. dataset (Dataset|None): the dataset to show results for, or if not defined use the active one. #} {% if dataset is none %} {% set dataset = s.task.active_dataset %} {% endif %} {% set sr = s.get_result(dataset) %} {# The submission result might be missing in some cases (e.g., cloned dataset); these cases are equivalent to the compiling state. #} {% set status = SubmissionResult.COMPILING %} {% if sr is not none %} {% set status = sr.get_status() %} {% endif %} {% set score_type = get_score_type(dataset=dataset) %} {{ s.timestamp }} {{ s.participation.user.username }} {{ s.task.name }} {% if status == SubmissionResult.COMPILING %} Compiling... {% else %}
{% if status == SubmissionResult.COMPILATION_FAILED %} Compilation failed