Skip to content
Snippets Groups Projects
Commit 403cfd4b authored by Rayane Belguebli's avatar Rayane Belguebli
Browse files

reformatage du tableau de code apogée qui affiche le code, la table et le titre

parent 4f8db525
No related branches found
No related tags found
No related merge requests found
...@@ -1057,14 +1057,17 @@ def formsemestre_status_head(formsemestre_id: int = None, page_title: str = None ...@@ -1057,14 +1057,17 @@ def formsemestre_status_head(formsemestre_id: int = None, page_title: str = None
return "".join(H) return "".join(H)
queries = [ queries = [
(text("SELECT elt_sem_apo, elt_annee_apo, elt_passage_apo FROM notes_formsemestre WHERE elt_sem_apo IS NOT NULL OR elt_annee_apo IS NOT NULL OR elt_passage_apo IS NOT NULL"), "notes_formsemestre"), (text("SELECT elt_sem_apo, titre FROM notes_formsemestre WHERE elt_sem_apo IS NOT NULL"), "SEMESTRE"),
(text("SELECT etape_apo FROM notes_formsemestre_etapes WHERE etape_apo IS NOT NULL"), "notes_formsemestre_etapes"), (text("SELECT elt_annee_apo, titre FROM notes_formsemestre WHERE elt_annee_apo IS NOT NULL"), "ANNEE"),
(text("SELECT code_apogee FROM notes_modules WHERE code_apogee IS NOT NULL"), "notes_modules"), (text("SELECT elt_passage_apo, titre FROM notes_formsemestre WHERE elt_passage_apo IS NOT NULL"), "PASSAGE"),
(text("SELECT code_apogee FROM notes_moduleimpl WHERE code_apogee IS NOT NULL"), "notes_moduleimpl"), #(text("SELECT etape_apo FROM notes_formsemestre_etapes WHERE etape_apo IS NOT NULL"), "ETAPES"),
(text("SELECT code_apogee, titre FROM notes_ue WHERE code_apogee IS NOT NULL"), "notes_ue"), (text("SELECT code_apogee, titre FROM notes_modules WHERE code_apogee IS NOT NULL"), "MODULE"),
(text("SELECT code_apogee_rcue, titre FROM notes_ue WHERE code_apogee_rcue IS NOT NULL"), "notes_ue") #(text("SELECT code_apogee FROM notes_moduleimpl WHERE code_apogee IS NOT NULL"), "MODULE IMP"),
(text("SELECT code_apogee, titre FROM notes_ue WHERE code_apogee IS NOT NULL"), "UE"),
(text("SELECT code_apogee_rcue, titre FROM notes_ue WHERE code_apogee_rcue IS NOT NULL"), "UE")
] ]
def get_code_apo_results(): def get_code_apo_results():
results = [] results = []
for query, table_name in queries: for query, table_name in queries:
...@@ -1080,7 +1083,7 @@ def generate_html_table(): ...@@ -1080,7 +1083,7 @@ def generate_html_table():
<tr> <tr>
<th>Code Apogée</th> <th>Code Apogée</th>
<th>Table</th> <th>Table</th>
<th>Valeurs</th> <th>Titre</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -1088,14 +1091,12 @@ def generate_html_table(): ...@@ -1088,14 +1091,12 @@ def generate_html_table():
for table_name, rows in results: for table_name, rows in results:
for row in rows: for row in rows:
code_apogee, titre = row
html_content += f""" html_content += f"""
<tr class="formsemestre_status_ue"> <tr class="formsemestre_status_ue">
<td colspan="5"> <td>{code_apogee}</td>
<span class="status_module_ue">{row}</span> <td>{table_name}</td>
</td> <td>{titre}</td>
<td colspan="5">
<span class="status_module_ue">{table_name}</span>
</td>
</tr> </tr>
""" """
html_content += """ html_content += """
...@@ -1104,6 +1105,7 @@ def generate_html_table(): ...@@ -1104,6 +1105,7 @@ def generate_html_table():
""" """
return html_content return html_content
def formsemestre_status(formsemestre_id=None, check_parcours=True): def formsemestre_status(formsemestre_id=None, check_parcours=True):
"""Tableau de bord semestre HTML""" """Tableau de bord semestre HTML"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment