diff --git a/app/scodoc/sco_formations.py b/app/scodoc/sco_formations.py index 178138b2..6c6e7019 100644 --- a/app/scodoc/sco_formations.py +++ b/app/scodoc/sco_formations.py @@ -256,6 +256,11 @@ def formation_import_xml(doc: str, import_tags=True): mod_info[1]["formation_id"] = formation_id mod_info[1]["matiere_id"] = mat_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]) if xml_module_id: modules_old2new[int(xml_module_id)] = mod_id diff --git a/app/views/notes.py b/app/views/notes.py index e66a42f7..86c4f6f7 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -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"]) @scodoc @permission_required(Permission.ScoChangeFormation)