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 = (