Ajout champs suppl. pour export qualif ES
This commit is contained in:
parent
ff11fa04ee
commit
81796a8e0c
2 changed files with 8 additions and 3 deletions
|
|
@ -420,6 +420,9 @@ class Examination(models.Model):
|
|||
class Meta:
|
||||
verbose_name = "Examen"
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.get_type_exam_display()} pour {self.student}"
|
||||
|
||||
def missing_examination_data(self):
|
||||
missing = []
|
||||
if not self.date_exam:
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ def export_qualification(request):
|
|||
'Mentor',
|
||||
'Session', 'Type', 'Exp_int.',
|
||||
'Expert ext. Civilité', 'Expert ext. Nom', 'Expert ext. Adresse', 'Expert ext. Localité',
|
||||
'Date', 'Salle', 'Note',
|
||||
'Date', 'Salle', 'Note', 'Note (2)', 'Convoc. env.', 'Récept. confirm',
|
||||
]
|
||||
|
||||
export_name = f'Export_qualif{date.today().strftime("%Y_%m_%d")}'
|
||||
|
|
@ -442,7 +442,6 @@ def export_qualification(request):
|
|||
export.write_line(headers, bold=True)
|
||||
|
||||
# Data
|
||||
empty_values = [''] * 7
|
||||
es_classes = Klass.objects.filter(section__name__in=['EDS', 'EDE', 'MSP'], level__name='3')
|
||||
students = Student.objects.filter(
|
||||
klass__in=es_classes, archived=False
|
||||
|
|
@ -472,11 +471,14 @@ def export_qualification(request):
|
|||
exam.date_exam,
|
||||
exam.room,
|
||||
exam.mark,
|
||||
exam.mark_acq,
|
||||
exam.date_soutenance_mailed,
|
||||
exam.date_confirm_received,
|
||||
]
|
||||
if lines_exported == 0:
|
||||
export.write_line(stud_values + exam_values)
|
||||
else:
|
||||
export.write_line(empty_values + exam_values)
|
||||
export.write_line((len(stud_values) * ['']) + exam_values)
|
||||
lines_exported += 1
|
||||
if lines_exported == 0:
|
||||
export.write_line(stud_values)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue