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: Returns:
L'année prévue de sa diplômation L'année prévue de sa diplômation
NOTE: Pourrait être déplacé dans app.models.etudiants.Identite
""" """
formsemestres = identite.get_formsemestres() formsemestres = identite.get_formsemestres()
if formsemestres: if formsemestres:
return max( dates_possibles_diplome = []
[pe_comp.get_annee_diplome_semestre(sem_base) for sem_base in formsemestres] 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: else:
return None return None

View File

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