forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -945,7 +945,7 @@ def formsemestre_bulletinetud(
|
|||||||
)[0]
|
)[0]
|
||||||
|
|
||||||
if format not in {"html", "pdfmail"}:
|
if format not in {"html", "pdfmail"}:
|
||||||
filename = scu.bul_filename(formsemestre, etud, format)
|
filename = scu.bul_filename(formsemestre, etud)
|
||||||
mime, suffix = scu.get_mime_suffix(format)
|
mime, suffix = scu.get_mime_suffix(format)
|
||||||
return scu.send_file(bulletin, filename, mime=mime, suffix=suffix)
|
return scu.send_file(bulletin, filename, mime=mime, suffix=suffix)
|
||||||
elif format == "pdfmail":
|
elif format == "pdfmail":
|
||||||
|
@ -1523,7 +1523,7 @@ def create_etapes_partition(formsemestre_id, partition_name="apo_etapes"):
|
|||||||
)
|
)
|
||||||
partition: Partition = db.session.get(Partition, pid)
|
partition: Partition = db.session.get(Partition, pid)
|
||||||
groups = partition.groups
|
groups = partition.groups
|
||||||
groups_by_names = {g["group_name"]: g for g in groups}
|
groups_by_names = {g.group_name: g for g in groups}
|
||||||
for etape in etapes:
|
for etape in etapes:
|
||||||
if etape not in groups_by_names:
|
if etape not in groups_by_names:
|
||||||
new_group = create_group(pid, etape)
|
new_group = create_group(pid, etape)
|
||||||
|
@ -660,10 +660,10 @@ def bul_filename_old(sem: dict, etud: dict, format):
|
|||||||
return filename
|
return filename
|
||||||
|
|
||||||
|
|
||||||
def bul_filename(formsemestre, etud, format):
|
def bul_filename(formsemestre, etud):
|
||||||
"""Build a filename for this bulletin"""
|
"""Build a filename for this bulletin (without suffix)"""
|
||||||
dt = time.strftime("%Y-%m-%d")
|
dt = time.strftime("%Y-%m-%d")
|
||||||
filename = f"bul-{formsemestre.titre_num()}-{dt}-{etud.nom}.{format}"
|
filename = f"bul-{formsemestre.titre_num()}-{dt}-{etud.nom}"
|
||||||
filename = make_filename(filename)
|
filename = make_filename(filename)
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.5.0"
|
SCOVERSION = "9.5.1"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user