forked from ScoDoc/ScoDoc
Bulletins mails interdits - closes #810
This commit is contained in:
parent
dc0061fb92
commit
7b8d5cff4d
@ -370,7 +370,7 @@ def bulletin(
|
||||
formsemestre_id : l'id d'un formsemestre
|
||||
code_type : "etudid", "nip" ou "ine"
|
||||
code : valeur du code INE, NIP ou etudid, selon code_type.
|
||||
version : type de bulletin (par défaut, "long"): short, long, selectedevals, butcourt
|
||||
version : type de bulletin (par défaut, "selectedevals"): short, long, selectedevals, butcourt
|
||||
pdf : si spécifié, bulletin au format PDF (et non JSON).
|
||||
|
||||
Exemple de résultat : voir https://scodoc.org/ScoDoc9API/#bulletin
|
||||
|
@ -52,6 +52,7 @@ from app.models import (
|
||||
FormSemestre,
|
||||
Identite,
|
||||
ModuleImplInscription,
|
||||
ScoDocSiteConfig,
|
||||
)
|
||||
from app.scodoc.sco_permissions import Permission
|
||||
from app.scodoc.sco_exceptions import AccessDenied, ScoValueError
|
||||
@ -950,13 +951,13 @@ def formsemestre_bulletinetud(
|
||||
|
||||
|
||||
def can_send_bulletin_by_mail(formsemestre_id):
|
||||
"""True if current user is allowed to send a bulletin by mail"""
|
||||
"""True if current user is allowed to send a bulletin (pdf) by mail"""
|
||||
sem = sco_formsemestre.get_formsemestre(formsemestre_id)
|
||||
return (
|
||||
sco_preferences.get_preference("bul_mail_allowed_for_all", formsemestre_id)
|
||||
or current_user.has_permission(Permission.EditFormSemestre)
|
||||
or current_user.id in sem["responsables"]
|
||||
)
|
||||
) and not ScoDocSiteConfig.is_bul_pdf_disabled()
|
||||
|
||||
|
||||
def do_formsemestre_bulletinetud(
|
||||
|
@ -35,8 +35,8 @@ from flask_login import current_user
|
||||
|
||||
from app import db, log
|
||||
from app.but import cursus_but
|
||||
from app.models.etudiants import Identite, make_etud_args
|
||||
from app.models.formsemestre import FormSemestre
|
||||
from app.models.etudiants import make_etud_args
|
||||
from app.models import Identite, FormSemestre, ScoDocSiteConfig
|
||||
from app.scodoc import html_sco_header
|
||||
from app.scodoc import htmlutils
|
||||
from app.scodoc import sco_archives_etud
|
||||
@ -235,7 +235,7 @@ def ficheEtud(etudid=None):
|
||||
info[
|
||||
"modifadresse"
|
||||
] = f"""<a class="stdlink" href="{
|
||||
url_for("scolar.form_change_coordonnees",
|
||||
url_for("scolar.form_change_coordonnees",
|
||||
scodoc_dept=g.scodoc_dept, etudid=etudid)
|
||||
}">modifier adresse</a>"""
|
||||
else:
|
||||
@ -282,7 +282,7 @@ def ficheEtud(etudid=None):
|
||||
|
||||
grlinks.append(
|
||||
f"""<a class="discretelink" href="{
|
||||
url_for('scolar.groups_view',
|
||||
url_for('scolar.groups_view',
|
||||
scodoc_dept=g.scodoc_dept, group_ids=partition['group_id'])
|
||||
}" title="Liste du groupe {gr_name}">{gr_name}</a>
|
||||
"""
|
||||
@ -307,15 +307,17 @@ def ficheEtud(etudid=None):
|
||||
with_all_columns=False,
|
||||
a_url="Notes/",
|
||||
)
|
||||
info[
|
||||
"link_bul_pdf"
|
||||
] = f"""
|
||||
info["link_bul_pdf"] = (
|
||||
"""<span class="link_bul_pdf fontred">PDF interdits par l'admin.</span>"""
|
||||
if ScoDocSiteConfig.is_bul_pdf_disabled()
|
||||
else f"""
|
||||
<span class="link_bul_pdf">
|
||||
<a class="stdlink" href="{
|
||||
url_for("notes.etud_bulletins_pdf", scodoc_dept=g.scodoc_dept, etudid=etudid)
|
||||
}">Tous les bulletins</a>
|
||||
</span>
|
||||
"""
|
||||
)
|
||||
last_formsemestre: FormSemestre = db.session.get(
|
||||
FormSemestre, info["sems"][0]["formsemestre_id"]
|
||||
)
|
||||
@ -333,11 +335,11 @@ def ficheEtud(etudid=None):
|
||||
info[
|
||||
"link_inscrire_ailleurs"
|
||||
] = f"""<span class="link_bul_pdf"><a class="stdlink" href="{
|
||||
url_for("notes.formsemestre_inscription_with_modules_form",
|
||||
url_for("notes.formsemestre_inscription_with_modules_form",
|
||||
scodoc_dept=g.scodoc_dept, etudid=etudid)
|
||||
}">Inscrire à un autre semestre</a></span>
|
||||
<span class="link_bul_pdf"><a class="stdlink" href="{
|
||||
url_for("notes.jury_delete_manual",
|
||||
url_for("notes.jury_delete_manual",
|
||||
scodoc_dept=g.scodoc_dept, etudid=etudid)
|
||||
}">Éditer toutes décisions de jury</a></span>
|
||||
"""
|
||||
@ -381,7 +383,7 @@ def ficheEtud(etudid=None):
|
||||
)
|
||||
author = sco_users.user_info(a["author"])
|
||||
alist.append(
|
||||
f"""<tr><td><span class="annodate">Le {a['date']} par {author['prenomnom']} :
|
||||
f"""<tr><td><span class="annodate">Le {a['date']} par {author['prenomnom']} :
|
||||
</span><span class="annoc">{a['comment']}</span></td>{a['dellink']}</tr>
|
||||
"""
|
||||
)
|
||||
@ -514,7 +516,7 @@ def ficheEtud(etudid=None):
|
||||
scu=scu,
|
||||
)}
|
||||
<div class="link_validation_rcues">
|
||||
<a href="{url_for("notes.validation_rcues",
|
||||
<a href="{url_for("notes.validation_rcues",
|
||||
scodoc_dept=g.scodoc_dept, etudid=etudid,
|
||||
formsemestre_id=last_formsemestre.id)}"
|
||||
title="Visualiser les compétences BUT"
|
||||
@ -530,7 +532,7 @@ def ficheEtud(etudid=None):
|
||||
<tr><td>
|
||||
<h2>%(nomprenom)s (%(inscription)s)</h2>
|
||||
%(etat_civil)s
|
||||
<span>%(emaillink)s</span>
|
||||
<span>%(emaillink)s</span>
|
||||
</td><td class="photocell">
|
||||
<a href="etud_photo_orig_page?etudid=%(etudid)s">%(etudfoto)s</a>
|
||||
</td></tr></table>
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "9.6.64"
|
||||
SCOVERSION = "9.6.65"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user