{% set contador = 0 %}
{% if trivial.modality == "INDIVIDUAL" %}
{% elseif trivial.modality == "COOPERATIVO" %}
{% set total = 0 %}
{% for record in registro[trivial.id] %}
{% set total = total + record.totalScore %}
{% endfor %}
{% set porcentaje = (total*100)/trivial.maxPuntuacion %}
{{total}}/{{trivial.maxPuntuacion}}
{% elseif trivial.modality == "TERRITORIAL" %}
{% set i = 1 %}
{% for category in trivial.category %}
{% set i = loop.index %}
{% if i < 3 %}
{{category.name}}
{% for record in registro[trivial.id] %}
{% if record['cat_id'] == category.id %}
{{record['user_name']}}:
{{record['sum_score']}}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}