1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-24 07:48:48 +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

@ -966,7 +966,7 @@ class Participation(models.Model):
reviews_template_begin = f"{settings.STATIC_URL}eteam/Written_review."
reviews_templates = "".join(f"<a href='{reviews_template_begin}{ext}'>{ext.upper()}</a>"
for ext in ["pdf", "tex"])
reviews_templates_content = "<p>" + _('Templates:') + " {reviews_templates}</p>"
reviews_templates_content = "<p>" + _('Templates:') + f" {reviews_templates}</p>"
content = reporter_content + opponent_content + reviewer_content + observer_content \
+ reviews_templates_content
@ -1039,7 +1039,7 @@ class Participation(models.Model):
'priority': 1,
'content': content,
})
elif settings.TFJM_APP == "ETEAM" \
elif settings.NB_ROUNDS >= 3 \
and timezone.now() <= tournament.reviews_third_phase_limit + timedelta(hours=2):
reporter_passage = Passage.objects.get(pool__tournament=self.tournament, pool__round=3, reporter=self)
opponent_passage = Passage.objects.get(pool__tournament=self.tournament, pool__round=3, opponent=self)
@ -1230,7 +1230,7 @@ class Pool(models.Model):
translation.activate(settings.PREFERRED_LANGUAGE_CODE)
pool_size = self.participations.count()
has_observer = settings.TFJM_APP == "ETEAM" and pool_size >= 4
has_observer = settings.HAS_OBSERVER and pool_size >= 4
passage_width = 6 + (2 if has_observer else 0)
passages = self.passages.all()
@ -1638,7 +1638,7 @@ class Pool(models.Model):
if not data or not data[0]:
return
has_observer = settings.TFJM_APP == "ETEAM" and self.participations.count() >= 4
has_observer = settings.HAS_OBSERVER and self.participations.count() >= 4
passage_width = 6 + (2 if has_observer else 0)
for line in data:
jury_name = line[0]