Commit 9ea06b6a authored by Mikael Salson's avatar Mikael Salson
Browse files

notes: rounding for letter marks

We want to perform an integer division not a rounding.
ie. having 1.5 has a result should yield a D mark not a C.
parent 5c0260bb
......@@ -10,7 +10,7 @@
{% spaceless %}
{% import _self as notes %}
{% if steps > 0 %}
{% set currentStep = (mark * (steps-1) / maximalMark) | round %}
{% set currentStep = (mark * (steps-1) / maximalMark) | round(0,'floor') %}
{{ notes.integerToLetterMark(steps - currentStep) }}
{% else %}
{{ mark | number_format(2) }}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment