Update app.py
Browse files
app.py
CHANGED
|
@@ -256,9 +256,12 @@ class EvaluationGymnique:
|
|
| 256 |
run.font.size = Pt(8)
|
| 257 |
|
| 258 |
def ajouter_zone_note(self):
|
|
|
|
|
|
|
|
|
|
| 259 |
zone_note = self.document.add_table(rows=1, cols=2)
|
| 260 |
zone_note.style = 'Table Grid'
|
| 261 |
-
zone_note.alignment = WD_TABLE_ALIGNMENT.RIGHT
|
| 262 |
|
| 263 |
cell_libelle = zone_note.cell(0, 0)
|
| 264 |
cell_libelle.text = "Note finale"
|
|
@@ -269,8 +272,8 @@ class EvaluationGymnique:
|
|
| 269 |
run.font.color.rgb = RGBColor(0, 32, 96)
|
| 270 |
|
| 271 |
cell_saisie = zone_note.cell(0, 1)
|
| 272 |
-
cell_saisie.width = Cm(1.5)
|
| 273 |
-
zone_note.rows[0].height = Cm(1.5)
|
| 274 |
shading_elm = parse_xml(f'<w:shd {nsdecls("w")} w:fill="F2F2F2"/>')
|
| 275 |
cell_saisie._tc.get_or_add_tcPr().append(shading_elm)
|
| 276 |
cell_saisie.text = "/20"
|
|
@@ -279,13 +282,17 @@ class EvaluationGymnique:
|
|
| 279 |
run.bold = True
|
| 280 |
run.font.size = Pt(12)
|
| 281 |
|
| 282 |
-
|
|
|
|
| 283 |
|
| 284 |
def ajouter_lignes_correcteurs(self):
|
|
|
|
|
|
|
|
|
|
| 285 |
for role in ["Projet", "principal", "ROV"]:
|
| 286 |
para = self.document.add_paragraph()
|
| 287 |
para.space_before = Pt(2)
|
| 288 |
-
para.space_after = Pt(
|
| 289 |
run = para.add_run(f"Correcteur {role} : ")
|
| 290 |
run.bold = True
|
| 291 |
para.add_run(".................................................................")
|
|
@@ -321,8 +328,8 @@ class EvaluationGymnique:
|
|
| 321 |
self.creer_tableau_elements()
|
| 322 |
self.ajouter_note_jury()
|
| 323 |
self.creer_tableau_recapitulatif()
|
|
|
|
| 324 |
self.ajouter_lignes_correcteurs()
|
| 325 |
-
self.ajouter_zone_note()
|
| 326 |
self.ajouter_note_candidat_avec_cadre()
|
| 327 |
self.document.save(nom_fichier)
|
| 328 |
return nom_fichier
|
|
@@ -384,4 +391,4 @@ def index():
|
|
| 384 |
return render_template("index.html")
|
| 385 |
|
| 386 |
if __name__ == "__main__":
|
| 387 |
-
app.run(debug=True)
|
|
|
|
| 256 |
run.font.size = Pt(8)
|
| 257 |
|
| 258 |
def ajouter_zone_note(self):
|
| 259 |
+
# Ajout d'un paragraphe avec espace avant la zone de note
|
| 260 |
+
self.document.add_paragraph().space_after = Pt(10)
|
| 261 |
+
|
| 262 |
zone_note = self.document.add_table(rows=1, cols=2)
|
| 263 |
zone_note.style = 'Table Grid'
|
| 264 |
+
zone_note.alignment = WD_TABLE_ALIGNMENT.LEFT # Changé de RIGHT à LEFT pour déplacer vers la gauche
|
| 265 |
|
| 266 |
cell_libelle = zone_note.cell(0, 0)
|
| 267 |
cell_libelle.text = "Note finale"
|
|
|
|
| 272 |
run.font.color.rgb = RGBColor(0, 32, 96)
|
| 273 |
|
| 274 |
cell_saisie = zone_note.cell(0, 1)
|
| 275 |
+
cell_saisie.width = Cm(1.5) # Largeur
|
| 276 |
+
zone_note.rows[0].height = Cm(1.5) # Hauteur égale à la largeur pour forme carrée
|
| 277 |
shading_elm = parse_xml(f'<w:shd {nsdecls("w")} w:fill="F2F2F2"/>')
|
| 278 |
cell_saisie._tc.get_or_add_tcPr().append(shading_elm)
|
| 279 |
cell_saisie.text = "/20"
|
|
|
|
| 282 |
run.bold = True
|
| 283 |
run.font.size = Pt(12)
|
| 284 |
|
| 285 |
+
# Ajout d'un espace après la zone de note
|
| 286 |
+
self.document.add_paragraph().space_after = Pt(10)
|
| 287 |
|
| 288 |
def ajouter_lignes_correcteurs(self):
|
| 289 |
+
# Ajout d'un espace avant les lignes de correcteurs
|
| 290 |
+
self.document.add_paragraph().space_after = Pt(10) # Ajoute un espace avant les correcteurs
|
| 291 |
+
|
| 292 |
for role in ["Projet", "principal", "ROV"]:
|
| 293 |
para = self.document.add_paragraph()
|
| 294 |
para.space_before = Pt(2)
|
| 295 |
+
para.space_after = Pt(10) # Augmenté de 2 à 10 pour créer plus d'espace entre les lignes
|
| 296 |
run = para.add_run(f"Correcteur {role} : ")
|
| 297 |
run.bold = True
|
| 298 |
para.add_run(".................................................................")
|
|
|
|
| 328 |
self.creer_tableau_elements()
|
| 329 |
self.ajouter_note_jury()
|
| 330 |
self.creer_tableau_recapitulatif()
|
| 331 |
+
self.ajouter_zone_note() # Déplacé avant les lignes de correcteurs
|
| 332 |
self.ajouter_lignes_correcteurs()
|
|
|
|
| 333 |
self.ajouter_note_candidat_avec_cadre()
|
| 334 |
self.document.save(nom_fichier)
|
| 335 |
return nom_fichier
|
|
|
|
| 391 |
return render_template("index.html")
|
| 392 |
|
| 393 |
if __name__ == "__main__":
|
| 394 |
+
app.run(debug=True)
|