forked from ScoDoc/ScoDoc
Préférences: section spéarée pour exports Apogée. Option pour supprimer la section APO_TYP_RES.
This commit is contained in:
parent
f2a9e3fd5c
commit
6d8af957fd
@ -78,6 +78,7 @@ from chardet import detect as chardet_detect
|
|||||||
|
|
||||||
from app import log
|
from app import log
|
||||||
from app.scodoc.sco_exceptions import ScoFormatError
|
from app.scodoc.sco_exceptions import ScoFormatError
|
||||||
|
from app.scodoc import sco_preferences
|
||||||
|
|
||||||
APO_PORTAL_ENCODING = (
|
APO_PORTAL_ENCODING = (
|
||||||
"utf8" # encodage du fichier CSV Apogée (était 'ISO-8859-1' avant jul. 2016)
|
"utf8" # encodage du fichier CSV Apogée (était 'ISO-8859-1' avant jul. 2016)
|
||||||
@ -384,9 +385,12 @@ col_ids={pprint.pformat(self.col_ids)}
|
|||||||
"""write apo CSV header on f
|
"""write apo CSV header on f
|
||||||
(beginning of CSV until columns titles just after XX-APO_VALEURS-XX line)
|
(beginning of CSV until columns titles just after XX-APO_VALEURS-XX line)
|
||||||
"""
|
"""
|
||||||
|
remove_typ_res = sco_preferences.get_preference("export_res_remove_typ_res")
|
||||||
for section, data in self.sections_str.items():
|
for section, data in self.sections_str.items():
|
||||||
if section != "XX-APO_VALEURS-XX":
|
# ne recopie pas la section résultats, et en option supprime APO_TYP_RES
|
||||||
# XXX TODO ici on va filtrer XX-APO_TYP_RES-XX
|
if (section != "XX-APO_VALEURS-XX") and (
|
||||||
|
section != "XX-APO_TYP_RES-XX" or not remove_typ_res
|
||||||
|
):
|
||||||
f.write(data)
|
f.write(data)
|
||||||
|
|
||||||
f.write("XX-APO_VALEURS-XX" + APO_NEWLINE)
|
f.write("XX-APO_VALEURS-XX" + APO_NEWLINE)
|
||||||
|
@ -205,6 +205,7 @@ PREF_CATEGORIES = (
|
|||||||
("apc", {"title": "BUT et Approches par Compétences"}),
|
("apc", {"title": "BUT et Approches par Compétences"}),
|
||||||
("abs", {"title": "Suivi des absences", "related": ("bul",)}),
|
("abs", {"title": "Suivi des absences", "related": ("bul",)}),
|
||||||
("portal", {"title": "Liaison avec portail (Apogée, etc)"}),
|
("portal", {"title": "Liaison avec portail (Apogée, etc)"}),
|
||||||
|
("apogee", {"title": "Exports Apogée"}),
|
||||||
(
|
(
|
||||||
"pdf",
|
"pdf",
|
||||||
{
|
{
|
||||||
@ -743,7 +744,7 @@ class BasePreferences(object):
|
|||||||
"explanation": "remplissage maquettes export Apogée",
|
"explanation": "remplissage maquettes export Apogée",
|
||||||
"input_type": "boolcheckbox",
|
"input_type": "boolcheckbox",
|
||||||
"labels": ["non", "oui"],
|
"labels": ["non", "oui"],
|
||||||
"category": "portal",
|
"category": "apogee",
|
||||||
"only_global": True,
|
"only_global": True,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -755,7 +756,7 @@ class BasePreferences(object):
|
|||||||
"explanation": "remplissage maquettes export Apogée",
|
"explanation": "remplissage maquettes export Apogée",
|
||||||
"input_type": "boolcheckbox",
|
"input_type": "boolcheckbox",
|
||||||
"labels": ["non", "oui"],
|
"labels": ["non", "oui"],
|
||||||
"category": "portal",
|
"category": "apogee",
|
||||||
"only_global": True,
|
"only_global": True,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -767,7 +768,7 @@ class BasePreferences(object):
|
|||||||
"explanation": "remplissage maquettes export Apogée",
|
"explanation": "remplissage maquettes export Apogée",
|
||||||
"input_type": "boolcheckbox",
|
"input_type": "boolcheckbox",
|
||||||
"labels": ["non", "oui"],
|
"labels": ["non", "oui"],
|
||||||
"category": "portal",
|
"category": "apogee",
|
||||||
"only_global": True,
|
"only_global": True,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -779,7 +780,7 @@ class BasePreferences(object):
|
|||||||
"explanation": "remplissage maquettes export Apogée",
|
"explanation": "remplissage maquettes export Apogée",
|
||||||
"input_type": "boolcheckbox",
|
"input_type": "boolcheckbox",
|
||||||
"labels": ["non", "oui"],
|
"labels": ["non", "oui"],
|
||||||
"category": "portal",
|
"category": "apogee",
|
||||||
"only_global": True,
|
"only_global": True,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -791,7 +792,7 @@ class BasePreferences(object):
|
|||||||
"explanation": "si coché, exporte exporte étudiants même si pas décision de jury saisie (sinon laisse vide)",
|
"explanation": "si coché, exporte exporte étudiants même si pas décision de jury saisie (sinon laisse vide)",
|
||||||
"input_type": "boolcheckbox",
|
"input_type": "boolcheckbox",
|
||||||
"labels": ["non", "oui"],
|
"labels": ["non", "oui"],
|
||||||
"category": "portal",
|
"category": "apogee",
|
||||||
"only_global": True,
|
"only_global": True,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -803,7 +804,19 @@ class BasePreferences(object):
|
|||||||
"explanation": "si coché, exporte exporte étudiants en attente de ratrapage comme ATT (sinon laisse vide)",
|
"explanation": "si coché, exporte exporte étudiants en attente de ratrapage comme ATT (sinon laisse vide)",
|
||||||
"input_type": "boolcheckbox",
|
"input_type": "boolcheckbox",
|
||||||
"labels": ["non", "oui"],
|
"labels": ["non", "oui"],
|
||||||
"category": "portal",
|
"category": "apogee",
|
||||||
|
"only_global": True,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"export_res_remove_typ_res",
|
||||||
|
{
|
||||||
|
"initvalue": 0,
|
||||||
|
"title": "Ne pas recopier la section APO_TYP_RES",
|
||||||
|
"explanation": "si coché, ne réécrit pas la section APO_TYP_RES (rarement utile, utiliser avec précaution)",
|
||||||
|
"input_type": "boolcheckbox",
|
||||||
|
"labels": ["non", "oui"],
|
||||||
|
"category": "apogee",
|
||||||
"only_global": True,
|
"only_global": True,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user