1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-22 03:18:24 +02:00

More ETEAM parametrization

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-10-20 20:13:49 +02:00
parent f327a4c9c4
commit 4317947501
12 changed files with 44 additions and 30 deletions

View File

@ -1259,7 +1259,7 @@ class PoolUploadNotesView(VolunteerMixin, FormView, DetailView):
return self.form_invalid(form)
for vr, notes in parsed_notes.items():
notes_count = 6 + (2 if pool.participations.count() >= 4 and settings.TFJM_APP == "ETEAM" else 0)
notes_count = 6 + (2 if pool.participations.count() >= 4 and settings.HAS_OBSERVER else 0)
for i, passage in enumerate(pool.passages.all()):
note = Note.objects.get_or_create(jury=vr, passage=passage)[0]
passage_notes = notes[notes_count * i:notes_count * (i + 1)]
@ -1297,7 +1297,7 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView):
translation.activate(settings.PREFERRED_LANGUAGE_CODE)
pool_size = self.object.passages.count()
has_observer = self.object.participations.count() >= 4 and settings.TFJM_APP == "ETEAM"
has_observer = self.object.participations.count() >= 4 and settings.HAS_OBSERVER
passage_width = 6 + (2 if has_observer else 0)
line_length = pool_size * passage_width