diff --git a/app/scodoc/sco_edit_ue.py b/app/scodoc/sco_edit_ue.py index cd5dcb7e..929911f6 100644 --- a/app/scodoc/sco_edit_ue.py +++ b/app/scodoc/sco_edit_ue.py @@ -471,7 +471,7 @@ def ue_table(formation_id=None, semestre_idx=1, msg=""): # was ue_list raise ScoValueError("invalid formation_id") parcours = formation.get_parcours() is_apc = parcours.APC_SAE - locked = sco_formations.formation_has_locked_sems(formation_id) + locked = formation.has_locked_sems() if semestre_idx == "all": semestre_idx = None else: @@ -541,7 +541,7 @@ def ue_table(formation_id=None, semestre_idx=1, msg=""): # was ue_list if locked: H.append( f"""
Cette formation est verrouillée car -{len(locked)} semestres verrouillés s'y réferent. +des semestres verrouillés s'y réferent. Si vous souhaitez modifier cette formation (par exemple pour y ajouter un module), vous devez:
diff --git a/app/scodoc/sco_saisie_notes.py b/app/scodoc/sco_saisie_notes.py index c1ba813d..0b5cb3ce 100644 --- a/app/scodoc/sco_saisie_notes.py +++ b/app/scodoc/sco_saisie_notes.py @@ -408,7 +408,7 @@ def evaluation_suppress_alln(evaluation_id, dialog_confirmed=False): if not dialog_confirmed: nb_changed, nb_suppress, existing_decisions = notes_add( - current_user, evaluation_id, notes, do_it=False + current_user, evaluation_id, notes, do_it=False, check_inscription=False ) msg = ( "Confirmer la suppression des %d notes ? (peut affecter plusieurs groupes)
" @@ -426,7 +426,11 @@ def evaluation_suppress_alln(evaluation_id, dialog_confirmed=False): # modif nb_changed, nb_suppress, existing_decisions = notes_add( - current_user, evaluation_id, notes, comment="effacer tout" + current_user, + evaluation_id, + notes, + comment="effacer tout", + check_inscription=False, ) assert nb_changed == nb_suppress H = ["%s notes supprimées
" % nb_suppress] @@ -454,7 +458,14 @@ def evaluation_suppress_alln(evaluation_id, dialog_confirmed=False): return html_sco_header.sco_header() + "\n".join(H) + html_sco_header.sco_footer() -def notes_add(user, evaluation_id: int, notes: list, comment=None, do_it=True) -> tuple: +def notes_add( + user, + evaluation_id: int, + notes: list, + comment=None, + do_it=True, + check_inscription=True, +) -> tuple: """ Insert or update notes notes is a list of tuples (etudid,value) @@ -475,7 +486,7 @@ def notes_add(user, evaluation_id: int, notes: list, comment=None, do_it=True) - ) } for (etudid, value) in notes: - if etudid not in inscrits: + if check_inscription and (etudid not in inscrits): raise NoteProcessError("etudiant non inscrit dans ce module") if not ((value is None) or (type(value) == type(1.0))): raise NoteProcessError(