Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
2 changed files with 16 additions and 6 deletions
Showing only changes of commit 02bccb58aa - Show all commits

View File

@ -417,14 +417,19 @@ def annee_diplome(identite: Identite) -> int:
Returns:
L'année prévue de sa diplômation
NOTE: Pourrait être déplacé dans app.models.etudiants.Identite
"""
formsemestres = identite.get_formsemestres()
if formsemestres:
return max(
[pe_comp.get_annee_diplome_semestre(sem_base) for sem_base in formsemestres]
)
dates_possibles_diplome = []
for sem_base in formsemestres:
annee = pe_comp.get_annee_diplome_semestre(sem_base)
if annee:
dates_possibles_diplome(annee)
if dates_possibles_diplome:
return max(dates_possibles_diplome)
else:
None
else:
return None

View File

@ -266,13 +266,18 @@ class JuryPE(object):
cursus = self.etudiants.cursus[etudid]
formsemestres = cursus["formsemestres"]
if cursus["diplome"]:
diplome = cursus["diplome"]
else:
diplome = "indéterminé"
administratif[etudid] = {
"Nom": etudiant.nom,
"Prenom": etudiant.prenom,
"Civilite": etudiant.civilite_str,
"Age": pe_comp.calcul_age(etudiant.date_naissance),
"Date d'entree": cursus["entree"],
"Date de diplome": cursus["diplome"],
"Date de diplome": diplome,
"Nbre de semestres": len(formsemestres),
}