Fix: bul. compat. XML
This commit is contained in:
parent
49d176c603
commit
6f257dc80d
@ -43,13 +43,13 @@ from app.but import bulletin_but
|
|||||||
from app.models import FormSemestre, Identite
|
from app.models import FormSemestre, Identite
|
||||||
import app.scodoc.sco_utils as scu
|
import app.scodoc.sco_utils as scu
|
||||||
import app.scodoc.notesdb as ndb
|
import app.scodoc.notesdb as ndb
|
||||||
from app.scodoc import sco_abs
|
|
||||||
from app.scodoc import sco_codes_parcours
|
from app.scodoc import sco_codes_parcours
|
||||||
from app.scodoc import sco_edit_ue
|
from app.scodoc import sco_edit_ue
|
||||||
from app.scodoc import sco_etud
|
from app.scodoc import sco_etud
|
||||||
from app.scodoc import sco_photos
|
from app.scodoc import sco_photos
|
||||||
from app.scodoc import sco_preferences
|
from app.scodoc import sco_preferences
|
||||||
from app.scodoc import sco_xml
|
from app.scodoc import sco_xml
|
||||||
|
from app.scodoc.sco_xml import quote_xml_attr
|
||||||
|
|
||||||
|
|
||||||
def bulletin_but_xml_compat(
|
def bulletin_but_xml_compat(
|
||||||
@ -108,13 +108,13 @@ def bulletin_but_xml_compat(
|
|||||||
etudid=str(etudid),
|
etudid=str(etudid),
|
||||||
code_nip=etud.code_nip or "",
|
code_nip=etud.code_nip or "",
|
||||||
code_ine=etud.code_ine or "",
|
code_ine=etud.code_ine or "",
|
||||||
nom=scu.quote_xml_attr(etud.nom),
|
nom=quote_xml_attr(etud.nom),
|
||||||
prenom=scu.quote_xml_attr(etud.prenom),
|
prenom=quote_xml_attr(etud.prenom),
|
||||||
civilite=scu.quote_xml_attr(etud.civilite_str),
|
civilite=quote_xml_attr(etud.civilite_str),
|
||||||
sexe=scu.quote_xml_attr(etud.civilite_str), # compat
|
sexe=quote_xml_attr(etud.civilite_str), # compat
|
||||||
photo_url=scu.quote_xml_attr(sco_photos.get_etud_photo_url(etud.id)),
|
photo_url=quote_xml_attr(sco_photos.get_etud_photo_url(etud.id)),
|
||||||
email=scu.quote_xml_attr(etud.get_first_email() or ""),
|
email=quote_xml_attr(etud.get_first_email() or ""),
|
||||||
emailperso=scu.quote_xml_attr(etud.get_first_email("emailperso") or ""),
|
emailperso=quote_xml_attr(etud.get_first_email("emailperso") or ""),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
# Disponible pour publication ?
|
# Disponible pour publication ?
|
||||||
@ -153,10 +153,10 @@ def bulletin_but_xml_compat(
|
|||||||
x_ue = Element(
|
x_ue = Element(
|
||||||
"ue",
|
"ue",
|
||||||
id=str(ue.id),
|
id=str(ue.id),
|
||||||
numero=scu.quote_xml_attr(ue.numero),
|
numero=quote_xml_attr(ue.numero),
|
||||||
acronyme=scu.quote_xml_attr(ue.acronyme or ""),
|
acronyme=quote_xml_attr(ue.acronyme or ""),
|
||||||
titre=scu.quote_xml_attr(ue.titre or ""),
|
titre=quote_xml_attr(ue.titre or ""),
|
||||||
code_apogee=scu.quote_xml_attr(ue.code_apogee or ""),
|
code_apogee=quote_xml_attr(ue.code_apogee or ""),
|
||||||
)
|
)
|
||||||
doc.append(x_ue)
|
doc.append(x_ue)
|
||||||
if ue.type != sco_codes_parcours.UE_SPORT:
|
if ue.type != sco_codes_parcours.UE_SPORT:
|
||||||
@ -192,11 +192,9 @@ def bulletin_but_xml_compat(
|
|||||||
code=str(modimpl.module.code or ""),
|
code=str(modimpl.module.code or ""),
|
||||||
coefficient=str(coef),
|
coefficient=str(coef),
|
||||||
numero=str(modimpl.module.numero or 0),
|
numero=str(modimpl.module.numero or 0),
|
||||||
titre=scu.quote_xml_attr(modimpl.module.titre or ""),
|
titre=quote_xml_attr(modimpl.module.titre or ""),
|
||||||
abbrev=scu.quote_xml_attr(modimpl.module.abbrev or ""),
|
abbrev=quote_xml_attr(modimpl.module.abbrev or ""),
|
||||||
code_apogee=scu.quote_xml_attr(
|
code_apogee=quote_xml_attr(modimpl.module.code_apogee or ""),
|
||||||
modimpl.module.code_apogee or ""
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
# XXX TODO rangs et effectifs
|
# XXX TODO rangs et effectifs
|
||||||
# --- notes de chaque eval:
|
# --- notes de chaque eval:
|
||||||
@ -215,7 +213,7 @@ def bulletin_but_xml_compat(
|
|||||||
coefficient=str(e.coefficient),
|
coefficient=str(e.coefficient),
|
||||||
# pas les poids en XML compat
|
# pas les poids en XML compat
|
||||||
evaluation_type=str(e.evaluation_type),
|
evaluation_type=str(e.evaluation_type),
|
||||||
description=scu.quote_xml_attr(e.description),
|
description=quote_xml_attr(e.description),
|
||||||
# notes envoyées sur 20, ceci juste pour garder trace:
|
# notes envoyées sur 20, ceci juste pour garder trace:
|
||||||
note_max_origin=str(e.note_max),
|
note_max_origin=str(e.note_max),
|
||||||
)
|
)
|
||||||
@ -262,7 +260,7 @@ def bulletin_but_xml_compat(
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
x_situation = Element("situation")
|
x_situation = Element("situation")
|
||||||
x_situation.text = scu.quote_xml_attr(infos["situation"])
|
x_situation.text = quote_xml_attr(infos["situation"])
|
||||||
doc.append(x_situation)
|
doc.append(x_situation)
|
||||||
if dpv:
|
if dpv:
|
||||||
decision = dpv["decisions"][0]
|
decision = dpv["decisions"][0]
|
||||||
@ -297,9 +295,9 @@ def bulletin_but_xml_compat(
|
|||||||
Element(
|
Element(
|
||||||
"decision_ue",
|
"decision_ue",
|
||||||
ue_id=str(ue["ue_id"]),
|
ue_id=str(ue["ue_id"]),
|
||||||
numero=scu.quote_xml_attr(ue["numero"]),
|
numero=quote_xml_attr(ue["numero"]),
|
||||||
acronyme=scu.quote_xml_attr(ue["acronyme"]),
|
acronyme=quote_xml_attr(ue["acronyme"]),
|
||||||
titre=scu.quote_xml_attr(ue["titre"]),
|
titre=quote_xml_attr(ue["titre"]),
|
||||||
code=decision["decisions_ue"][ue_id]["code"],
|
code=decision["decisions_ue"][ue_id]["code"],
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -322,7 +320,7 @@ def bulletin_but_xml_compat(
|
|||||||
"appreciation",
|
"appreciation",
|
||||||
date=ndb.DateDMYtoISO(appr["date"]),
|
date=ndb.DateDMYtoISO(appr["date"]),
|
||||||
)
|
)
|
||||||
x_appr.text = scu.quote_xml_attr(appr["comment"])
|
x_appr.text = quote_xml_attr(appr["comment"])
|
||||||
doc.append(x_appr)
|
doc.append(x_appr)
|
||||||
|
|
||||||
if is_appending:
|
if is_appending:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.4.3"
|
SCOVERSION = "9.4.4"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user