forked from ScoDoc/ScoDoc
Import XML: remove useless route and set default module type
This commit is contained in:
parent
9e494d39cb
commit
01af698c6c
@ -256,6 +256,11 @@ def formation_import_xml(doc: str, import_tags=True):
|
|||||||
mod_info[1]["formation_id"] = formation_id
|
mod_info[1]["formation_id"] = formation_id
|
||||||
mod_info[1]["matiere_id"] = mat_id
|
mod_info[1]["matiere_id"] = mat_id
|
||||||
mod_info[1]["ue_id"] = ue_id
|
mod_info[1]["ue_id"] = ue_id
|
||||||
|
mod_info[1]["module_type"] = (
|
||||||
|
scu.ModuleType.STANDARD
|
||||||
|
if mod_info[1]["module_type"] is None
|
||||||
|
else mod_info[1]["module_type"]
|
||||||
|
)
|
||||||
mod_id = sco_edit_module.do_module_create(mod_info[1])
|
mod_id = sco_edit_module.do_module_create(mod_info[1])
|
||||||
if xml_module_id:
|
if xml_module_id:
|
||||||
modules_old2new[int(xml_module_id)] = mod_id
|
modules_old2new[int(xml_module_id)] = mod_id
|
||||||
|
@ -648,17 +648,6 @@ def formation_export(formation_id, export_ids=False, format=None):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/formation_import_xml")
|
|
||||||
@scodoc
|
|
||||||
@permission_required(Permission.ScoChangeFormation)
|
|
||||||
@scodoc7func
|
|
||||||
def formation_import_xml(file):
|
|
||||||
"import d'une formation en XML"
|
|
||||||
log("formation_import_xml")
|
|
||||||
doc = file.read()
|
|
||||||
return sco_formations.formation_import_xml(doc)
|
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/formation_import_xml_form", methods=["GET", "POST"])
|
@bp.route("/formation_import_xml_form", methods=["GET", "POST"])
|
||||||
@scodoc
|
@scodoc
|
||||||
@permission_required(Permission.ScoChangeFormation)
|
@permission_required(Permission.ScoChangeFormation)
|
||||||
|
Loading…
Reference in New Issue
Block a user