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 ? # Disponible pour publication ?
if not published: if not published:
return doc # stop ! return sco_xml.XML_HEADER + ElementTree.tostring(doc).decode(
scu.SCO_ENCODING
) # stop !
# Moyenne générale: # Moyenne générale:
doc.append( doc.append(
Element( Element(

View File

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