diff --git a/stages/admin.py b/stages/admin.py index 70fa6d5..c446166 100644 --- a/stages/admin.py +++ b/stages/admin.py @@ -126,7 +126,7 @@ class StudentAdmin(admin.ModelAdmin): ("Examen Qualification ES", { 'classes': ('collapse',), 'fields': ( - ('session', 'date_exam', 'room', 'mark'), + ('session', 'date_exam', 'room'), ('supervisor', 'supervision_attest_received'), ('subject', 'title'), ('training_referent', 'referent', 'mentor'), @@ -134,14 +134,16 @@ class StudentAdmin(admin.ModelAdmin): ('date_soutenance_mailed', 'date_confirm_received'), ('examination_ede_actions',), ('examination_eds_actions',), + ('mark', 'mark_acq'), ) }), ("Entretien professionnel ES", { 'classes': ('collapse',), 'fields': ( - ('session_ep', 'date_exam_ep', 'room_ep', 'mark_ep'), + ('session_ep', 'date_exam_ep', 'room_ep'), ('internal_expert_ep', 'expert_ep'), ('date_soutenance_ep_mailed', 'date_confirm_ep_received'), + ('mark_ep', 'mark_ep_acq'), ) }), ) diff --git a/stages/migrations/0024_mark_fields_dup.py b/stages/migrations/0024_mark_fields_dup.py new file mode 100644 index 0000000..2c5f506 --- /dev/null +++ b/stages/migrations/0024_mark_fields_dup.py @@ -0,0 +1,32 @@ +# Generated by Django 2.2.6 on 2019-10-07 15:04 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('stages', '0023_mark_ep_to_choices'), + ] + + operations = [ + migrations.AddField( + model_name='student', + name='mark_acq', + field=models.CharField(blank=True, choices=[('non', 'Non acquis'), ('part', 'Partiellement acquis'), ('acq', 'Acquis')], max_length=5, verbose_name='Note'), + ), + migrations.AddField( + model_name='student', + name='mark_ep_acq', + field=models.CharField(blank=True, choices=[('non', 'Non acquis'), ('part', 'Partiellement acquis'), ('acq', 'Acquis')], max_length=5, verbose_name='Note EP'), + ), + migrations.RemoveField( + model_name='student', + name='mark_ep', + ), + migrations.AddField( + model_name='student', + name='mark_ep', + field=models.DecimalField(blank=True, decimal_places=2, max_digits=3, null=True, verbose_name='Note EP'), + ), + ] diff --git a/stages/models.py b/stages/models.py index 5f8d189..70d83ec 100644 --- a/stages/models.py +++ b/stages/models.py @@ -323,6 +323,7 @@ class Student(models.Model): last_appointment = models.DateField(blank=True, null=True) room = models.CharField('Salle', max_length=15, blank=True) mark = models.DecimalField('Note', max_digits=3, decimal_places=2, blank=True, null=True) + mark_acq = models.CharField('Note', max_length=5, choices=ACQ_MARK_CHOICES, blank=True) date_soutenance_mailed = models.DateTimeField("Convoc. env.", blank=True, null=True) date_confirm_received = models.DateTimeField("Récept. confirm", blank=True, null=True) # ============== Fields for Entretien professionnel ========= @@ -332,7 +333,8 @@ class Student(models.Model): ) date_exam_ep = models.DateTimeField("Date exam. EP", blank=True, null=True) room_ep = models.CharField('Salle EP', max_length=15, blank=True) - mark_ep = models.CharField('Note EP', max_length=5, choices=ACQ_MARK_CHOICES, blank=True) + mark_ep = models.DecimalField('Note EP', max_digits=3, decimal_places=2, blank=True, null=True) + mark_ep_acq = models.CharField('Note EP', max_length=5, choices=ACQ_MARK_CHOICES, blank=True) internal_expert_ep = models.ForeignKey( Teacher, related_name='rel_internal_expert_ep', verbose_name='Expert interne EP', null=True, blank=True, on_delete=models.SET_NULL