forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -55,11 +55,11 @@ def pvjury_page_but(formsemestre_id: int, fmt="html"):
|
|||||||
else:
|
else:
|
||||||
line_sep = "\n"
|
line_sep = "\n"
|
||||||
rows, titles = pvjury_table_but(formsemestre, line_sep=line_sep)
|
rows, titles = pvjury_table_but(formsemestre, line_sep=line_sep)
|
||||||
|
if fmt.startswith("xls"):
|
||||||
|
titles["ects_but"] = "Total ECTS BUT"
|
||||||
# Style excel... passages à la ligne sur \n
|
# Style excel... passages à la ligne sur \n
|
||||||
xls_style_base = sco_excel.excel_make_style()
|
xls_style_base = sco_excel.excel_make_style()
|
||||||
xls_style_base["alignment"] = Alignment(wrapText=True, vertical="top")
|
xls_style_base["alignment"] = Alignment(wrapText=True, vertical="top")
|
||||||
|
|
||||||
tab = GenTable(
|
tab = GenTable(
|
||||||
base_url=f"{request.base_url}?formsemestre_id={formsemestre_id}",
|
base_url=f"{request.base_url}?formsemestre_id={formsemestre_id}",
|
||||||
caption=title,
|
caption=title,
|
||||||
@ -144,11 +144,14 @@ def pvjury_table_but(
|
|||||||
except ScoValueError:
|
except ScoValueError:
|
||||||
deca = None
|
deca = None
|
||||||
|
|
||||||
|
ects_but_valides = but_ects_valides(etud, referentiel_competence_id)
|
||||||
row = {
|
row = {
|
||||||
"nom": etud.code_ine or etud.code_nip or etud.id
|
"nom": (
|
||||||
|
etud.code_ine or etud.code_nip or etud.id
|
||||||
if anonymous # Mode anonyme: affiche INE ou sinon NIP, ou id
|
if anonymous # Mode anonyme: affiche INE ou sinon NIP, ou id
|
||||||
else etud.etat_civil_pv(
|
else etud.etat_civil_pv(
|
||||||
line_sep=line_sep, with_paragraph=with_paragraph_nom
|
line_sep=line_sep, with_paragraph=with_paragraph_nom
|
||||||
|
)
|
||||||
),
|
),
|
||||||
"_nom_order": etud.sort_key,
|
"_nom_order": etud.sort_key,
|
||||||
"_nom_target_attrs": f'class="etudinfo" id="{etud.id}"',
|
"_nom_target_attrs": f'class="etudinfo" id="{etud.id}"',
|
||||||
@ -159,15 +162,19 @@ def pvjury_table_but(
|
|||||||
etudid=etud.id,
|
etudid=etud.id,
|
||||||
),
|
),
|
||||||
"cursus": _descr_cursus_but(etud),
|
"cursus": _descr_cursus_but(etud),
|
||||||
"ects": f"""{deca.ects_annee():g}<br><br>Tot. {but_ects_valides(etud, referentiel_competence_id ):g}""",
|
"ects": f"""{deca.ects_annee():g}<br><br>Tot. {ects_but_valides:g}""",
|
||||||
|
"_ects_xls": deca.ects_annee(),
|
||||||
|
"ects_but": ects_but_valides,
|
||||||
"ues": deca.descr_ues_validation(line_sep=line_sep) if deca else "-",
|
"ues": deca.descr_ues_validation(line_sep=line_sep) if deca else "-",
|
||||||
"niveaux": deca.descr_niveaux_validation(line_sep=line_sep)
|
"niveaux": (
|
||||||
if deca
|
deca.descr_niveaux_validation(line_sep=line_sep) if deca else "-"
|
||||||
else "-",
|
),
|
||||||
"decision_but": deca.code_valide if deca else "",
|
"decision_but": deca.code_valide if deca else "",
|
||||||
"devenir": ", ".join([f"S{i}" for i in deca.get_autorisations_passage()])
|
"devenir": (
|
||||||
|
", ".join([f"S{i}" for i in deca.get_autorisations_passage()])
|
||||||
if deca
|
if deca
|
||||||
else "",
|
else ""
|
||||||
|
),
|
||||||
}
|
}
|
||||||
if deca.valide_diplome() or not only_diplome:
|
if deca.valide_diplome() or not only_diplome:
|
||||||
rows.append(row)
|
rows.append(row)
|
||||||
|
@ -263,16 +263,16 @@ class GenTable:
|
|||||||
colspan_count -= 1
|
colspan_count -= 1
|
||||||
# if colspan_count > 0:
|
# if colspan_count > 0:
|
||||||
# continue # skip cells after a span
|
# continue # skip cells after a span
|
||||||
if pdf_mode:
|
if pdf_mode and f"_{cid}_pdf" in row:
|
||||||
content = row.get(f"_{cid}_pdf", False) or row.get(cid, "")
|
content = row[f"_{cid}_pdf"]
|
||||||
elif xls_mode:
|
elif xls_mode and f"_{cid}_xls" in row:
|
||||||
content = row.get(f"_{cid}_xls", False) or row.get(cid, "")
|
content = row[f"_{cid}_xls"]
|
||||||
else:
|
else:
|
||||||
content = row.get(cid, "")
|
content = row.get(cid, "")
|
||||||
# Convert None to empty string ""
|
# Convert None to empty string ""
|
||||||
content = "" if content is None else content
|
content = "" if content is None else content
|
||||||
|
|
||||||
colspan = row.get("_%s_colspan" % cid, 0)
|
colspan = row.get(f"_{cid}_colspan", 0)
|
||||||
if colspan > 1:
|
if colspan > 1:
|
||||||
pdf_style_list.append(
|
pdf_style_list.append(
|
||||||
(
|
(
|
||||||
|
@ -250,7 +250,6 @@ def trombino_copy_photos(group_ids=None, dialog_confirmed=False):
|
|||||||
"Copy photos from portal to ScoDoc (overwriting local copy)"
|
"Copy photos from portal to ScoDoc (overwriting local copy)"
|
||||||
group_ids = [] if group_ids is None else group_ids
|
group_ids = [] if group_ids is None else group_ids
|
||||||
groups_infos = sco_groups_view.DisplayedGroupsInfos(group_ids)
|
groups_infos = sco_groups_view.DisplayedGroupsInfos(group_ids)
|
||||||
breakpoint()
|
|
||||||
back_url = "groups_view?%s&curtab=tab-photos" % groups_infos.groups_query_args
|
back_url = "groups_view?%s&curtab=tab-photos" % groups_infos.groups_query_args
|
||||||
|
|
||||||
portal_url = sco_portal_apogee.get_portal_url()
|
portal_url = sco_portal_apogee.get_portal_url()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.6.956"
|
SCOVERSION = "9.6.957"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user