diff --git a/app/scodoc/sco_bulletins.py b/app/scodoc/sco_bulletins.py index 9b776eb49..e2b4f3c81 100644 --- a/app/scodoc/sco_bulletins.py +++ b/app/scodoc/sco_bulletins.py @@ -56,7 +56,6 @@ from app.models import ( ) from app.scodoc.sco_permissions import Permission from app.scodoc.sco_exceptions import AccessDenied, ScoValueError, ScoTemporaryError -from app.scodoc import html_sco_header from app.scodoc import htmlutils from app.scodoc import sco_assiduites from app.scodoc import sco_bulletins_generator @@ -960,7 +959,21 @@ def formsemestre_bulletinetud( elif fmt == "pdfmail": return "" H = [ - _formsemestre_bulletinetud_header_html(etud, formsemestre, fmt, version), + render_template( + "bul_head.j2", + etud=etud, + fmt=fmt, + formsemestre=formsemestre, + menu_autres_operations=make_menu_autres_operations( + etud=etud, + formsemestre=formsemestre, + endpoint="notes.formsemestre_bulletinetud", + version=version, + ), + scu=scu, + time=time, + version=version, + ), bulletin, render_template( "bul_foot.j2", @@ -971,10 +984,18 @@ def formsemestre_bulletinetud( inscription_courante=etud.inscription_courante(), inscription_str=etud.inscription_descr()["inscription_str"], ), - html_sco_header.sco_footer(), ] - - return "".join(H) + return render_template( + "sco_page.j2", + title=f"Bulletin de {etud.nomprenom}", + content="".join(H), + javascripts=[ + "js/bulletin.js", + "libjs/d3.v3.min.js", + "js/radar_bulletin.js", + ], + cssstyles=["css/radar_bulletin.css"], + ) def can_send_bulletin_by_mail(formsemestre_id): @@ -1312,38 +1333,3 @@ def make_menu_autres_operations( }, ] return htmlutils.make_menu("Autres opérations", menu_items, alone=True) - - -def _formsemestre_bulletinetud_header_html( - etud, - formsemestre: FormSemestre, - fmt=None, - version=None, -): - H = [ - html_sco_header.sco_header( - page_title=f"Bulletin de {etud.nomprenom}", - javascripts=[ - "js/bulletin.js", - "libjs/d3.v3.min.js", - "js/radar_bulletin.js", - ], - cssstyles=["css/radar_bulletin.css"], - ), - render_template( - "bul_head.j2", - etud=etud, - fmt=fmt, - formsemestre=formsemestre, - menu_autres_operations=make_menu_autres_operations( - etud=etud, - formsemestre=formsemestre, - endpoint="notes.formsemestre_bulletinetud", - version=version, - ), - scu=scu, - time=time, - version=version, - ), - ] - return "\n".join(H) diff --git a/app/scodoc/sco_evaluation_check_abs.py b/app/scodoc/sco_evaluation_check_abs.py index e8865708a..83532b136 100644 --- a/app/scodoc/sco_evaluation_check_abs.py +++ b/app/scodoc/sco_evaluation_check_abs.py @@ -33,7 +33,6 @@ from flask_sqlalchemy.query import Query from app import db from app.models import Evaluation, FormSemestre, Identite, Assiduite import app.scodoc.sco_utils as scu -from app.scodoc import html_sco_header from app.scodoc import sco_evaluations from app.scodoc import sco_evaluation_db from app.scodoc import sco_groups diff --git a/app/scodoc/sco_find_etud.py b/app/scodoc/sco_find_etud.py index d0cd13bb1..07c76cb3a 100644 --- a/app/scodoc/sco_find_etud.py +++ b/app/scodoc/sco_find_etud.py @@ -36,7 +36,6 @@ from app import db from app.models import Departement, Identite import app.scodoc.notesdb as ndb from app.scodoc.gen_tables import GenTable -from app.scodoc import html_sco_header from app.scodoc import sco_etud from app.scodoc import sco_groups from app.scodoc.sco_exceptions import ScoException @@ -52,7 +51,7 @@ def form_search_etud( title="Rechercher un étudiant par nom : ", add_headers=False, # complete page ): - "form recherche par nom" + "form recherche par nom: utilisé pour choisir un étudiant à inscrire, par exemple" H = [] H.append( f"""