Fix: bug Cergy (module type)
This commit is contained in:
parent
3b8f28bbb3
commit
3f23cb74a6
@ -41,7 +41,6 @@ from app.models import FormSemestre, ModuleImpl
|
|||||||
|
|
||||||
import app.scodoc.notesdb as ndb
|
import app.scodoc.notesdb as ndb
|
||||||
import app.scodoc.sco_utils as scu
|
import app.scodoc.sco_utils as scu
|
||||||
from app.scodoc.sco_utils import ModuleType
|
|
||||||
from app.scodoc.TrivialFormulator import TrivialFormulator
|
from app.scodoc.TrivialFormulator import TrivialFormulator
|
||||||
from app.scodoc.sco_permissions import Permission
|
from app.scodoc.sco_permissions import Permission
|
||||||
from app.scodoc.sco_exceptions import (
|
from app.scodoc.sco_exceptions import (
|
||||||
@ -196,7 +195,6 @@ def module_create(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
semestres_indices = list(range(1, parcours.NB_SEM + 1))
|
|
||||||
|
|
||||||
if is_apc:
|
if is_apc:
|
||||||
module_types = scu.ModuleType # tous les types
|
module_types = scu.ModuleType # tous les types
|
||||||
@ -451,8 +449,6 @@ def module_delete(module_id=None):
|
|||||||
|
|
||||||
def do_module_edit(vals: dict) -> None:
|
def do_module_edit(vals: dict) -> None:
|
||||||
"edit a module"
|
"edit a module"
|
||||||
from app.scodoc import sco_edit_formation
|
|
||||||
|
|
||||||
# check
|
# check
|
||||||
mod = module_list({"module_id": vals["module_id"]})[0]
|
mod = module_list({"module_id": vals["module_id"]})[0]
|
||||||
if module_is_locked(mod["module_id"]):
|
if module_is_locked(mod["module_id"]):
|
||||||
@ -546,7 +542,7 @@ def module_edit(module_id=None):
|
|||||||
# ne propose pas SAE et Ressources, sauf si déjà de ce type...
|
# ne propose pas SAE et Ressources, sauf si déjà de ce type...
|
||||||
module_types = (
|
module_types = (
|
||||||
set(scu.ModuleType) - {scu.ModuleType.RESSOURCE, scu.ModuleType.SAE}
|
set(scu.ModuleType) - {scu.ModuleType.RESSOURCE, scu.ModuleType.SAE}
|
||||||
) | {a_module.module_type}
|
) | {a_module.module_type or scu.ModuleType.STANDARD}
|
||||||
|
|
||||||
descr = [
|
descr = [
|
||||||
(
|
(
|
||||||
@ -845,7 +841,7 @@ def formation_add_malus_modules(formation_id, titre=None, redirect=True):
|
|||||||
[
|
[
|
||||||
mod
|
mod
|
||||||
for mod in module_list(args={"ue_id": ue["ue_id"]})
|
for mod in module_list(args={"ue_id": ue["ue_id"]})
|
||||||
if mod["module_type"] == ModuleType.MALUS
|
if mod["module_type"] == scu.ModuleType.MALUS
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
if nb_mod_malus == 0:
|
if nb_mod_malus == 0:
|
||||||
@ -897,7 +893,7 @@ def ue_add_malus_module(ue_id, titre=None, code=None):
|
|||||||
"matiere_id": matiere_id,
|
"matiere_id": matiere_id,
|
||||||
"formation_id": ue["formation_id"],
|
"formation_id": ue["formation_id"],
|
||||||
"semestre_id": semestre_id,
|
"semestre_id": semestre_id,
|
||||||
"module_type": ModuleType.MALUS,
|
"module_type": scu.ModuleType.MALUS,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.1.55"
|
SCOVERSION = "9.1.56"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user