diff --git a/misc/createtables.sql b/misc/createtables.sql
index 9196fb3e..bb809dfe 100644
--- a/misc/createtables.sql
+++ b/misc/createtables.sql
@@ -394,7 +394,7 @@ CREATE TABLE notes_formsemestre (
elt_annee_apo text -- code element annee Apogee, eg VRT1A ou V2INLA,V2INCA
) WITH OIDS;
--- id des utilsateurs responsables (aka directeurs des etudes) du semestre:
+-- id des utilisateurs responsables (aka directeurs des etudes) du semestre:
CREATE TABLE notes_formsemestre_responsables (
formsemestre_id text REFERENCES notes_formsemestre(formsemestre_id) ON DELETE CASCADE,
responsable_id text NOT NULL,
diff --git a/sco_formsemestre_status.py b/sco_formsemestre_status.py
index fe070742..8b9116b6 100644
--- a/sco_formsemestre_status.py
+++ b/sco_formsemestre_status.py
@@ -907,6 +907,12 @@ def formsemestre_status(context, formsemestre_id=None, REQUEST=None):
Responsable |
Evaluations | """
)
+ mails_enseignants = set(
+ [
+ context.Users.user_info(ens_id, REQUEST)["email"]
+ for ens_id in sem["responsables"]
+ ]
+ ) # adr. mail des enseignants
for M in Mlist:
Mod = M["module"]
ModDescr = (
@@ -923,6 +929,12 @@ def formsemestre_status(context, formsemestre_id=None, REQUEST=None):
ModInscrits = context.do_moduleimpl_inscription_list(
moduleimpl_id=M["moduleimpl_id"]
)
+ mails_enseignants.add(
+ context.Users.user_info(M["responsable_id"], REQUEST)["email"]
+ )
+ mails_enseignants |= set(
+ [context.Users.user_info(m["ens_id"], REQUEST)["email"] for m in M["ens"]]
+ )
ue = M["ue"]
if prev_ue_id != ue["ue_id"]:
prev_ue_id = ue["ue_id"]
@@ -1047,5 +1059,11 @@ def formsemestre_status(context, formsemestre_id=None, REQUEST=None):
)
# --- LISTE DES ETUDIANTS
H += ['', context.make_listes_sem(sem, REQUEST), "
"]
-
+ # --- Lien mail enseignants:
+ adrlist = list(mails_enseignants - set([""]))
+ if adrlist:
+ H.append(
+ 'Courrier aux %d enseignants du semestre
'
+ % (",".join(adrlist), len(adrlist))
+ )
return "".join(H) + context.sco_footer(REQUEST)