Fix: exports bul. xml quand non publiés

This commit is contained in:
Emmanuel Viennet 2022-01-08 15:27:40 +01:00
parent f2e9fbb8cd
commit fbae5d268f
2 changed files with 9 additions and 5 deletions

View File

@ -117,7 +117,9 @@ def bulletin_but_xml_compat(
)
# Disponible pour publication ?
if not published:
return doc # stop !
return sco_xml.XML_HEADER + ElementTree.tostring(doc).decode(
scu.SCO_ENCODING
) # stop !
# Moyenne générale:
doc.append(
Element(

View File

@ -93,9 +93,9 @@ def make_xml_formsemestre_bulletinetud(
)
if (not sem["bul_hide_xml"]) or force_publishing:
published = "1"
published = 1
else:
published = "0"
published = 0
if xml_nodate:
docdate = ""
else:
@ -105,7 +105,7 @@ def make_xml_formsemestre_bulletinetud(
"etudid": str(etudid),
"formsemestre_id": str(formsemestre_id),
"date": docdate,
"publie": published,
"publie": str(published),
}
if sem["etapes"]:
el["etape_apo"] = str(sem["etapes"][0]) or ""
@ -141,7 +141,9 @@ def make_xml_formsemestre_bulletinetud(
# Disponible pour publication ?
if not published:
return doc # stop !
return sco_xml.XML_HEADER + ElementTree.tostring(doc).decode(
scu.SCO_ENCODING
) # stop !
# Groupes:
partitions = sco_groups.get_partitions_list(formsemestre_id, with_default=False)