mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-22 03:47:48 +00:00
Expand timeSpent choices for evaluation document and translate them to user locale or fallback 'fr'
This commit is contained in:
@@ -216,9 +216,29 @@
|
||||
|
||||
{% if e.timeSpent is not null and e.timeSpent > 0 %}
|
||||
<li>
|
||||
{% set minutes = (e.timeSpent / 60) %}
|
||||
<span
|
||||
class="item-key">{{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }}</span> {{ 'duration.minute'|trans({ '{m}' : minutes }) }}
|
||||
{% set totalHours = (e.timeSpent / 3600)|round(0, 'floor') %}
|
||||
{% set totalMinutes = ((e.timeSpent % 3600) / 60)|round(0, 'floor') %}
|
||||
|
||||
<span class="item-key">{{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }}</span>
|
||||
|
||||
{% if totalHours >= 8 %}
|
||||
{% set days = (totalHours / 8)|round(0, 'floor') %}
|
||||
{% set remainingHours = totalHours % 8 %}
|
||||
|
||||
{% if days > 0 %}
|
||||
{{ 'duration.day'|trans({ '{d}' : days }) }}
|
||||
{% endif %}
|
||||
{% if remainingHours > 0 %}
|
||||
{{ 'duration.hour'|trans({ '{h}' : remainingHours }) }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if totalHours > 0 %}
|
||||
{{ 'duration.hour'|trans({ '{h}' : totalHours }) }}
|
||||
{% endif %}
|
||||
{% if totalMinutes > 0 %}
|
||||
{{ 'duration.minute'|trans({ '{m}' : totalMinutes }) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% elseif displayContent is defined and displayContent == 'long' %}
|
||||
<li>
|
||||
|
||||
Reference in New Issue
Block a user