Dernières opérations
+ """
+ ]
+
+ for news in news_list:
+ H.append(
+ f"""- {news.formatted_date()}{news}
"""
+ )
+
+ H.append("
")
+
+ # Informations générales
+ H.append(
+ f"""
+ """
+ )
+
+ H.append("
")
+ return "\n".join(H)
diff --git a/app/models/formsemestre.py b/app/models/formsemestre.py
index 4ec90052..edf5fa68 100644
--- a/app/models/formsemestre.py
+++ b/app/models/formsemestre.py
@@ -374,6 +374,16 @@ class FormSemestre(db.Model):
return self.titre
return f"{self.titre} {self.formation.get_parcours().SESSION_NAME} {self.semestre_id}"
+ def sem_modalite(self) -> str:
+ """Le semestre et la modialité, ex "S2 FI" ou "S3 APP" """
+ if self.semestre_id > 0:
+ descr_sem = f"S{self.semestre_id}"
+ else:
+ descr_sem = ""
+ if self.modalite:
+ descr_sem += " " + self.modalite
+ return descr_sem
+
def get_abs_count(self, etudid):
"""Les comptes d'absences de cet étudiant dans ce semestre:
tuple (nb abs, nb abs justifiées)
diff --git a/app/scodoc/sco_dept.py b/app/scodoc/sco_dept.py
index 453aa2f6..c19f9360 100644
--- a/app/scodoc/sco_dept.py
+++ b/app/scodoc/sco_dept.py
@@ -32,6 +32,7 @@ from flask import g, request
from flask_login import current_user
import app
+from app.models import ScolarNews
import app.scodoc.sco_utils as scu
from app.scodoc.gen_tables import GenTable
from app.scodoc.sco_permissions import Permission
@@ -40,9 +41,7 @@ import app.scodoc.notesdb as ndb
from app.scodoc import sco_formsemestre
from app.scodoc import sco_formsemestre_inscriptions
from app.scodoc import sco_modalites
-from app.scodoc import sco_news
from app.scodoc import sco_preferences
-from app.scodoc import sco_up_to_date
from app.scodoc import sco_users
@@ -53,7 +52,7 @@ def index_html(showcodes=0, showsemtable=0):
H = []
# News:
- H.append(sco_news.scolar_news_summary_html())
+ H.append(ScolarNews.scolar_news_summary_html())
# Avertissement de mise à jour:
H.append("""