diff --git a/draw/consumers.py b/draw/consumers.py index fc93423..88cf408 100644 --- a/draw/consumers.py +++ b/draw/consumers.py @@ -891,7 +891,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer): await self.channel_layer.group_send(f"volunteer-{self.tournament.id}", {'tid': self.tournament_id, 'type': 'draw.dice_visibility', 'visible': True}) - elif r.number == 1 and (self.tournament.final or settings.TFJM_APP == "ETEAM"): + elif r.number == 1 and (self.tournament.final or not settings.HAS_FINAL): # For the final tournament, we wait for a manual update between the two rounds. msg += "

" + _("The draw of the first round is ended.") self.tournament.draw.last_message = msg diff --git a/draw/models.py b/draw/models.py index 6ffa60c..7bf2c9f 100644 --- a/draw/models.py +++ b/draw/models.py @@ -163,7 +163,7 @@ class Draw(models.Model): "\"My participation\".") s += "

" if s else "" - rules_link = "https://tfjm.org/reglement" if settings.TFJM_APP == "TFJM" else "https://eteam.tfjm.org/rules/" + rules_link = settings.RULES_LINK s += _("For more details on the draw, the rules are available on " "{link}.").format(link=rules_link) return s @@ -419,7 +419,7 @@ class Pool(models.Model): reporter = tds[line[0]].participation opponent = tds[line[1]].participation reviewer = tds[line[2]].participation - observer = tds[line[3]].participation if self.size >= 4 and settings.TFJM_APP == "ETEAM" else None + observer = tds[line[3]].participation if self.size >= 4 and settings.HAS_OBSERVER else None # Create the passage await Passage.objects.acreate( diff --git a/draw/static/tfjm/js/draw.js b/draw/static/tfjm/js/draw.js index 6c31f49..c72cf31 100644 --- a/draw/static/tfjm/js/draw.js +++ b/draw/static/tfjm/js/draw.js @@ -4,8 +4,8 @@ await Notification.requestPermission() })() -// TODO ETEAM Mieux paramétriser (5 pour le TFJM², 6 pour l'ETEAM) -const RECOMMENDED_SOLUTIONS_COUNT = 6 +const TFJM = JSON.parse(document.getElementById('TFJM_settings').textContent) +const RECOMMENDED_SOLUTIONS_COUNT = TFJM.RECOMMENDED_SOLUTIONS_COUNT const problems_count = JSON.parse(document.getElementById('problems_count').textContent) diff --git a/draw/templates/draw/tournament_content.html b/draw/templates/draw/tournament_content.html index 9bc4724..3d1d326 100644 --- a/draw/templates/draw/tournament_content.html +++ b/draw/templates/draw/tournament_content.html @@ -176,7 +176,7 @@ 📁 {% trans "Export" %} - {% if tournament.final or TFJM.APP == "ETEAM" %} + {% if tournament.final or not TFJM.HAS_FINAL %} {# Volunteers can continue the second round for the final tournament #}