From 573862c82cb1ddcf55a0cb55767b4531e2d83232 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Fri, 12 Sep 2025 14:09:55 +0200 Subject: [PATCH] =?UTF-8?q?Afficher=20proc=C3=A9dures=20de=20qualif=20auss?= =?UTF-8?q?i=20pour=20fili=C3=A8re=20MSP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stages/admin.py | 4 ++-- stages/models.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/stages/admin.py b/stages/admin.py index 44ff324..97dbe44 100644 --- a/stages/admin.py +++ b/stages/admin.py @@ -227,7 +227,7 @@ class StudentAdmin(admin.ModelAdmin): # SupervisionBillInline is only adequate for EDE students if not obj.klass or obj.klass.section.name != 'EDE': inlines = [inl for inl in inlines if inl != SupervisionBillInline] - if not obj.is_ede() and not obj.is_eds(): + if not obj.is_ede() and not obj.is_eds() and not obs.is_msp(): inlines = [inl for inl in inlines if inl != ExaminationInline] if request.method == 'POST': # Special case where inlines would be different before and after POST @@ -238,7 +238,7 @@ class StudentAdmin(admin.ModelAdmin): return inlines def get_fieldsets(self, request, obj=None): - if not obj or (not obj.is_ede() and not obj.is_eds()): + if not obj or (not obj.is_ede() and not obj.is_eds() and not obj.is_msp()): # Hide group "Procédure de qualification" fieldsets = deepcopy(self.fieldsets) fieldsets[1][1]['classes'] = ['hidden'] diff --git a/stages/models.py b/stages/models.py index f4b5408..dae28e6 100644 --- a/stages/models.py +++ b/stages/models.py @@ -385,6 +385,9 @@ class Student(models.Model): def is_eds(self): return self.klass and self.klass.section.name == 'EDS' + def is_msp(self): + return self.klass and self.klass.section.name == 'MSP' + class Examination(models.Model): ACQ_MARK_CHOICES = (