Skip to content
Snippets Groups Projects
Commit 45ec03ec authored by Emmanuel Viennet's avatar Emmanuel Viennet
Browse files

Améliore présentation bilan ECTS + fix bug but_ects_valides si pas d'ECTS

parent 6ae433aa
Branches
No related tags found
No related merge requests found
...@@ -399,7 +399,7 @@ def but_ects_valides( ...@@ -399,7 +399,7 @@ def but_ects_valides(
for v in validations: for v in validations:
key = (v.ue.semestre_idx, v.ue.niveau_competence.id) key = (v.ue.semestre_idx, v.ue.niveau_competence.id)
if v.code in CODES_UE_VALIDES: if v.code in CODES_UE_VALIDES:
ects_dict[key] = v.ue.ects ects_dict[key] = v.ue.ects or 0.0
return int(sum(ects_dict.values())) if ects_dict else 0 return int(sum(ects_dict.values())) if ects_dict else 0
...@@ -417,15 +417,18 @@ def but_validations_ues( ...@@ -417,15 +417,18 @@ def but_validations_ues(
validations = ( validations = (
ScolarFormSemestreValidation.query.filter_by(etudid=etud.id) ScolarFormSemestreValidation.query.filter_by(etudid=etud.id)
.filter(ScolarFormSemestreValidation.ue_id != None) .filter(ScolarFormSemestreValidation.ue_id != None)
.join(FormSemestre, ScolarFormSemestreValidation.formsemestre)
.join(UniteEns) .join(UniteEns)
.join(ApcNiveau) .join(ApcNiveau)
) )
# restreint à certaines années (utile pour les ECTS du DUT120) # restreint à certaines années (utile pour les ECTS du DUT120)
if annees_but: if annees_but:
validations = validations.filter(ApcNiveau.annee.in_(annees_but)) validations = validations.filter(ApcNiveau.annee.in_(annees_but))
# Et restreint au référentiel de compétence: # restreint au référentiel de compétence et trie
return validations.join(ApcCompetence).filter_by( return (
referentiel_id=referentiel_competence_id validations.join(ApcCompetence)
.filter_by(referentiel_id=referentiel_competence_id)
.order_by(FormSemestre.semestre_id, UniteEns.numero, UniteEns.acronyme)
) )
......
...@@ -13,6 +13,11 @@ div.ue_list_etud_validations ul.liste_validations li { ...@@ -13,6 +13,11 @@ div.ue_list_etud_validations ul.liste_validations li {
div.ue_list_etud_validations div.total_ects { div.ue_list_etud_validations div.total_ects {
font-weight: bold; font-weight: bold;
margin-top: 16px; margin-top: 24px;
margin-bottom: 12px; margin-bottom: 12px;
} }
div.ue_list_etud_validations ul li.new_semestre,
div.ue_list_etud_validations ul li:first-child {
margin-top: 16px;
}
\ No newline at end of file
...@@ -8,7 +8,11 @@ ...@@ -8,7 +8,11 @@
<ul class="liste_validations"> <ul class="liste_validations">
{% for validation in validations %} {% for validation in validations %}
<li>{{ validation.html() | safe }} <li
{% if loop.index0 > 0 and validation.formsemestre and loop.previtem.formsemestre.semestre_id != validation.formsemestre.semestre_id %}
class="new_semestre"
{% endif %}
>{{ validation.html() | safe }}
{% if edit_mode %} {% if edit_mode %}
{% if validation.formsemestre and validation.formsemestre.can_edit_jury() %} {% if validation.formsemestre and validation.formsemestre.can_edit_jury() %}
<form class="inline-form"> <form class="inline-form">
......
# -*- mode: python -*- # -*- mode: python -*-
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
SCOVERSION = "9.6.990" SCOVERSION = "9.7.0"
SCONAME = "ScoDoc" SCONAME = "ScoDoc"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment