Ajoute nip au nom de l'HTML détaillant les résultats d'un étudiant

This commit is contained in:
Cléo Baras 2024-03-13 11:39:25 +01:00
parent 24237eb7b7
commit 5827a37a31
1 changed files with 11 additions and 6 deletions

View File

@ -66,6 +66,7 @@ from app.pe.moys import (
)
import app.pe.pe_rcss_jury as pe_rcss_jury
from app.scodoc.sco_utils import *
from app.models import FormSemestre, Identite, Formation
class JuryPE(object):
@ -616,10 +617,12 @@ class JuryPE(object):
):
etudids = list(self.diplomes_ids)
for etudid in etudids:
nom, prenom, html = self.synthetise_jury_etudiant(etudid)
self.add_file_to_zip(
zipfile, f"{nom}_{prenom}.html", html, path="etudiants"
)
nom, prenom, nip, html = self.synthetise_jury_etudiant(etudid)
if nip:
fichier = f"{nom}_{prenom}_{nip}.html"
else:
fichier = f"{nom}_{prenom}.html"
self.add_file_to_zip(zipfile, fichier, html, path="etudiants")
else:
pe_affichage.pe_print(" > Pas de synthèse étudiant/étudiant possible/prévu")
@ -738,9 +741,11 @@ class JuryPE(object):
Returns:
Un tuple nom, prenom, html
"""
etudiant = self.etudiants.identites[etudid]
etudiant: Identite = self.etudiants.identites[etudid]
nom = etudiant.nom
prenom = etudiant.prenom # initial du prénom
nip = etudiant.code_nip # le code nip (pouvant être non renseigne)
parcours = self.etudiants.cursus[etudid]["parcours"]
if not parcours:
parcours = "<parcours indéterminé>"
@ -817,7 +822,7 @@ class JuryPE(object):
moyennes=moyennes,
)
return (nom, prenom, html)
return (nom, prenom, nip, html)
def get_formsemestres_etudiants(etudiants: pe_etudiant.EtudiantsJuryPE) -> dict: