forked from ScoDoc/ScoDoc
Fix: form_import_infos_admissions missing argument in view
This commit is contained in:
parent
d4e115c7fd
commit
8add5a66cd
@ -50,7 +50,7 @@
|
||||
<div class="vspaced">
|
||||
<a class="stdlink" href="{{
|
||||
url_for('scolar.import_generate_admission_sample',
|
||||
scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre_id)
|
||||
scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre.id)
|
||||
}}">exporter les données actuelles de ScoDoc</a>
|
||||
</div>
|
||||
(ce fichier peut être ré-importé après d'éventuelles modifications)
|
||||
|
@ -2259,18 +2259,18 @@ def import_generate_excel_sample(with_codesemestre="1"):
|
||||
@scodoc7func
|
||||
def import_generate_admission_sample(formsemestre_id):
|
||||
"une feuille excel pour importation données admissions"
|
||||
group = sco_groups.get_group(sco_groups.get_default_group(formsemestre_id))
|
||||
formsemestre = FormSemestre.get_formsemestre(formsemestre_id)
|
||||
group = formsemestre.get_default_group()
|
||||
fmt = sco_import_etuds.sco_import_format()
|
||||
data = sco_import_etuds.sco_import_generate_excel_sample(
|
||||
fmt,
|
||||
only_tables=["identite", "admissions", "adresse"],
|
||||
exclude_cols=["nationalite", "foto", "photo_filename"],
|
||||
group_ids=[group["group_id"]],
|
||||
group_ids=[group.id],
|
||||
)
|
||||
return scu.send_file(
|
||||
data, "AdmissionEtudiants", scu.XLSX_SUFFIX, mime=scu.XLSX_MIMETYPE
|
||||
)
|
||||
# return sco_excel.send_excel_file(data, "AdmissionEtudiants" + scu.XLSX_SUFFIX)
|
||||
|
||||
|
||||
# --- Données admission depuis fichier excel (version nov 2016)
|
||||
@ -2280,6 +2280,7 @@ def import_generate_admission_sample(formsemestre_id):
|
||||
@scodoc7func
|
||||
def form_import_infos_admissions(formsemestre_id=None):
|
||||
"formulaire import xls"
|
||||
formsemestre = FormSemestre.get_formsemestre(formsemestre_id)
|
||||
authuser = current_user
|
||||
if not authuser.has_permission(Permission.EtudInscrit):
|
||||
# autorise juste l'export
|
||||
@ -2291,7 +2292,7 @@ def form_import_infos_admissions(formsemestre_id=None):
|
||||
les étudiants (admission, ...)</h2>
|
||||
<p>
|
||||
<a href="{ url_for('scolar.import_generate_admission_sample',
|
||||
scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre_id )
|
||||
scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre.id )
|
||||
}">Exporter les informations de ScoDoc (classeur Excel)</a> (ce fichier
|
||||
peut être ré-importé après d'éventuelles modifications)
|
||||
</p>
|
||||
@ -2337,6 +2338,8 @@ def form_import_infos_admissions(formsemestre_id=None):
|
||||
title="Import données admissions",
|
||||
tf_form=tf[1],
|
||||
adm_table_description_format=sco_import_etuds.adm_table_description_format().html(),
|
||||
formsemestre=formsemestre,
|
||||
sco=ScoData(formsemestre=formsemestre),
|
||||
)
|
||||
if tf[0] == -1:
|
||||
return flask.redirect(
|
||||
|
Loading…
Reference in New Issue
Block a user