Saisie jury: améliore page démissionnaires/défaillant. Voir #425
This commit is contained in:
parent
8d72229e8b
commit
77c0294c83
@ -76,7 +76,13 @@ def formsemestre_validation_etud_form(
|
||||
sortcol=None,
|
||||
readonly=True,
|
||||
):
|
||||
formsemestre = FormSemestre.query.get_or_404(formsemestre_id)
|
||||
"""Formulaire de validation des décisions de jury"""
|
||||
formsemestre: FormSemestre = FormSemestre.query.filter_by(
|
||||
id=formsemestre_id, dept_id=g.scodoc_dept_id
|
||||
).first_or_404()
|
||||
etud: Identite = Identite.query.filter_by(
|
||||
id=etudid, dept_id=g.scodoc_dept_id
|
||||
).first_or_404()
|
||||
nt: NotesTableCompat = res_sem.load_formsemestre_results(formsemestre)
|
||||
T = nt.get_table_moyennes_triees()
|
||||
if not etudid and etud_index is None:
|
||||
@ -197,14 +203,15 @@ def formsemestre_validation_etud_form(
|
||||
H.append('<div class="ue_warning"><span>Etudiant défaillant</span></div>')
|
||||
if etud_etat != scu.INSCRIT:
|
||||
H.append(
|
||||
tf_error_message(
|
||||
f"""Impossible de statuer sur cet étudiant:
|
||||
f"""
|
||||
<div class="warning">
|
||||
Impossible de statuer sur cet étudiant:
|
||||
il est démissionnaire ou défaillant (voir <a href="{
|
||||
url_for("scolar.ficheEtud", scodoc_dept=g.scodoc_dept, etudid=etudid)
|
||||
}">sa fiche</a>)
|
||||
</div>
|
||||
"""
|
||||
)
|
||||
)
|
||||
return "\n".join(H + footer)
|
||||
|
||||
H.append(
|
||||
|
@ -2264,6 +2264,13 @@ def formsemestre_validation_but(
|
||||
etudid: int,
|
||||
):
|
||||
"Form. saisie décision jury semestre BUT"
|
||||
formsemestre: FormSemestre = FormSemestre.query.filter_by(
|
||||
id=formsemestre_id, dept_id=g.scodoc_dept_id
|
||||
).first_or_404()
|
||||
etud: Identite = Identite.query.filter_by(
|
||||
id=etudid, dept_id=g.scodoc_dept_id
|
||||
).first_or_404()
|
||||
|
||||
# la route ne donne pas le type d'etudid pour pouvoir construire des URLs
|
||||
# provisoires avec NEXT et PREV
|
||||
try:
|
||||
@ -2272,6 +2279,34 @@ def formsemestre_validation_but(
|
||||
abort(404, "invalid etudid")
|
||||
read_only = not sco_permissions_check.can_validate_sem(formsemestre_id)
|
||||
|
||||
# --- Navigation
|
||||
prev = f"""{scu.EMO_PREV_ARROW} <a href="{url_for(
|
||||
"notes.formsemestre_validation_but", scodoc_dept=g.scodoc_dept,
|
||||
formsemestre_id=formsemestre_id, etudid="PREV"
|
||||
)}" class="stdlink"">précédent</a>
|
||||
"""
|
||||
next = f"""<a href="{url_for(
|
||||
"notes.formsemestre_validation_but", scodoc_dept=g.scodoc_dept,
|
||||
formsemestre_id=formsemestre_id, etudid="NEXT"
|
||||
)}" class="stdlink"">suivant</a> {scu.EMO_NEXT_ARROW}
|
||||
"""
|
||||
navigation_div = f"""
|
||||
<div class="but_navigation">
|
||||
<div class="prev">
|
||||
{prev}
|
||||
</div>
|
||||
<div class="back_list">
|
||||
<a href="{url_for(
|
||||
"notes.formsemestre_saisie_jury", scodoc_dept=g.scodoc_dept,
|
||||
formsemestre_id=formsemestre_id, selected_etudid=etud.id
|
||||
)}" class="stdlink">retour à la liste</a>
|
||||
</div>
|
||||
<div class="next">
|
||||
{next}
|
||||
</div>
|
||||
</div>
|
||||
"""
|
||||
|
||||
H = [
|
||||
html_sco_header.sco_header(
|
||||
page_title="Validation BUT",
|
||||
@ -2285,20 +2320,28 @@ def formsemestre_validation_but(
|
||||
""",
|
||||
]
|
||||
|
||||
formsemestre = FormSemestre.query.get_or_404(formsemestre_id)
|
||||
etud = Identite.query.get_or_404(etudid)
|
||||
if formsemestre.etuds_inscriptions[etudid].etat != scu.INSCRIT:
|
||||
return (
|
||||
"\n".join(H)
|
||||
+ f"""<div class="warning">Impossible de statuer sur cet étudiant:
|
||||
+ f"""
|
||||
<div>
|
||||
<div class="bull_head">
|
||||
<div>
|
||||
<div class="titre_parcours">Jury BUT</div>
|
||||
<div class="nom_etud">{etud.nomprenom}</div>
|
||||
</div>
|
||||
<div class="bull_photo"><a href="{
|
||||
url_for("scolar.ficheEtud", scodoc_dept=g.scodoc_dept, etudid=etud.id)
|
||||
}">{etud.photo_html(title="fiche de " + etud.nomprenom)}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="warning">Impossible de statuer sur cet étudiant:
|
||||
il est démissionnaire ou défaillant (voir <a class="stdlink" href="{
|
||||
url_for("scolar.ficheEtud", scodoc_dept=g.scodoc_dept, etudid=etudid)
|
||||
}">sa fiche</a>)
|
||||
</div>
|
||||
<div><a class="stdlink" href="{url_for(
|
||||
"notes.formsemestre_saisie_jury", scodoc_dept=g.scodoc_dept,
|
||||
formsemestre_id=formsemestre_id, selected_etudid=etud.id
|
||||
)}">retour à la liste</a></div>
|
||||
</div>
|
||||
{navigation_div}
|
||||
</div>
|
||||
"""
|
||||
+ html_sco_header.sco_footer()
|
||||
@ -2372,35 +2415,7 @@ def formsemestre_validation_but(
|
||||
</div>
|
||||
"""
|
||||
)
|
||||
# --- Navigation
|
||||
prev = f"""{scu.EMO_PREV_ARROW} <a href="{url_for(
|
||||
"notes.formsemestre_validation_but", scodoc_dept=g.scodoc_dept,
|
||||
formsemestre_id=formsemestre_id, etudid="PREV"
|
||||
)}" class="stdlink"">précédent</a>
|
||||
"""
|
||||
next = f"""<a href="{url_for(
|
||||
"notes.formsemestre_validation_but", scodoc_dept=g.scodoc_dept,
|
||||
formsemestre_id=formsemestre_id, etudid="NEXT"
|
||||
)}" class="stdlink"">suivant</a> {scu.EMO_NEXT_ARROW}
|
||||
"""
|
||||
H.append(
|
||||
f"""
|
||||
<div class="but_navigation">
|
||||
<div class="prev">
|
||||
{prev}
|
||||
</div>
|
||||
<div class="back_list">
|
||||
<a href="{url_for(
|
||||
"notes.formsemestre_saisie_jury", scodoc_dept=g.scodoc_dept,
|
||||
formsemestre_id=formsemestre_id, selected_etudid=etud.id
|
||||
)}" class="stdlink">retour à la liste</a>
|
||||
</div>
|
||||
<div class="next">
|
||||
{next}
|
||||
</div>
|
||||
</div>
|
||||
"""
|
||||
)
|
||||
H.append(navigation_div)
|
||||
H.append("</form>")
|
||||
|
||||
H.append(
|
||||
|
Loading…
Reference in New Issue
Block a user