{% load mardmo_tags %}
{% for reference in references.values %}
{% if id_option and reference.0 == id_option %}
{% if reference.1 %}{{ id_label }}: {{ reference.1 }}{% if id_option == option.SWMATH %}{% with problem=reference.1|swmath_problem %}{% if problem %} {{ problem|upper }}{% endif %}{% endwith %}{% endif %}
{% else %}{{ id_label }}: MISSING {{ id_label|upper }} VALUE
{% endif %}
{% endif %}
{% if reference.0 == option.DOI %}
{% if reference.1 %}DOI: {{ reference.1 }}{% with problem=reference.1|doi_problem %}{% if problem %} {{ problem|upper }}{% endif %}{% endwith %}
{% else %}DOI: MISSING DOI VALUE
{% endif %}
{% endif %}
{% if reference.0 == option.DESCRIPTION_URL %}
{% if reference.1 %}Described at URL: {{ reference.1 }}{% with problem=reference.1|url_problem:reference.0 %}{% if problem %} {{ problem|upper }}{% endif %}{% endwith %}
{% else %}Described at URL: MISSING DESCRIPTION URL VALUE
{% endif %}
{% endif %}
{% if reference.0 == option.SOURCECODE_URL %}
{% if reference.1 %}Source Code URL: {{ reference.1 }}{% with problem=reference.1|url_problem:reference.0 %}{% if problem %} {{ problem|upper }}{% endif %}{% endwith %}
{% else %}Source Code URL: MISSING SOURCE CODE URL VALUE
{% endif %}
{% endif %}
{% empty %}
{{ missing_msg }}
{% endfor %}