forked from ScoDoc/ScoDoc
Lien mail enseignants sur tableau bord semestre
This commit is contained in:
parent
fcbbc877bc
commit
de6d0233ac
@ -394,7 +394,7 @@ CREATE TABLE notes_formsemestre (
|
|||||||
elt_annee_apo text -- code element annee Apogee, eg VRT1A ou V2INLA,V2INCA
|
elt_annee_apo text -- code element annee Apogee, eg VRT1A ou V2INLA,V2INCA
|
||||||
) WITH OIDS;
|
) 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 (
|
CREATE TABLE notes_formsemestre_responsables (
|
||||||
formsemestre_id text REFERENCES notes_formsemestre(formsemestre_id) ON DELETE CASCADE,
|
formsemestre_id text REFERENCES notes_formsemestre(formsemestre_id) ON DELETE CASCADE,
|
||||||
responsable_id text NOT NULL,
|
responsable_id text NOT NULL,
|
||||||
|
@ -907,6 +907,12 @@ def formsemestre_status(context, formsemestre_id=None, REQUEST=None):
|
|||||||
<th class="resp">Responsable</th>
|
<th class="resp">Responsable</th>
|
||||||
<th class="evals">Evaluations</th></tr>"""
|
<th class="evals">Evaluations</th></tr>"""
|
||||||
)
|
)
|
||||||
|
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:
|
for M in Mlist:
|
||||||
Mod = M["module"]
|
Mod = M["module"]
|
||||||
ModDescr = (
|
ModDescr = (
|
||||||
@ -923,6 +929,12 @@ def formsemestre_status(context, formsemestre_id=None, REQUEST=None):
|
|||||||
ModInscrits = context.do_moduleimpl_inscription_list(
|
ModInscrits = context.do_moduleimpl_inscription_list(
|
||||||
moduleimpl_id=M["moduleimpl_id"]
|
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"]
|
ue = M["ue"]
|
||||||
if prev_ue_id != ue["ue_id"]:
|
if prev_ue_id != ue["ue_id"]:
|
||||||
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
|
# --- LISTE DES ETUDIANTS
|
||||||
H += ['<div id="groupes">', context.make_listes_sem(sem, REQUEST), "</div>"]
|
H += ['<div id="groupes">', context.make_listes_sem(sem, REQUEST), "</div>"]
|
||||||
|
# --- Lien mail enseignants:
|
||||||
|
adrlist = list(mails_enseignants - set([""]))
|
||||||
|
if adrlist:
|
||||||
|
H.append(
|
||||||
|
'<p><a class="stdlink" href="mailto:?cc=%s">Courrier aux %d enseignants du semestre</a></p>'
|
||||||
|
% (",".join(adrlist), len(adrlist))
|
||||||
|
)
|
||||||
return "".join(H) + context.sco_footer(REQUEST)
|
return "".join(H) + context.sco_footer(REQUEST)
|
||||||
|
Loading…
Reference in New Issue
Block a user