{% if exc -%}
Failure

An unknown exception occured when attempting to recalculate weighted mean grades.

{{ exc }}

{% elif failed -%}
Warning

Unable to recalculate mean grades of all submissions.

The following submissions failed:
{% else -%}
Success

Recalculated grades of all submissions.

{% endif %}