From 75e25fb3df7705050ab24576bfc9a663be967d33 Mon Sep 17 00:00:00 2001
From: ben8
Date: Sat, 17 May 2025 12:08:25 +0200
Subject: [PATCH] fix und Balkenanimation
---
django/play/consumers/game.py | 2 +-
.../templates/play/game/score_overview.html | 41 +++++++++++++------
2 files changed, 29 insertions(+), 14 deletions(-)
diff --git a/django/play/consumers/game.py b/django/play/consumers/game.py
index 484fe7f..985412b 100644
--- a/django/play/consumers/game.py
+++ b/django/play/consumers/game.py
@@ -188,7 +188,7 @@ class GameConsumer(AsyncWebsocketConsumer):
question_data = json.loads(current_question.data)
print(answer_index)
try:
- #if answer_index >= 0 : # -1 means timeout
+ if answer_index >= 0 : # -1 means timeout
is_correct = question_data['options'][answer_index]['is_correct']
print(is_correct)
except:
diff --git a/django/templates/play/game/score_overview.html b/django/templates/play/game/score_overview.html
index b75eed5..bf17498 100644
--- a/django/templates/play/game/score_overview.html
+++ b/django/templates/play/game/score_overview.html
@@ -10,10 +10,16 @@
{{ question_data.question }}
{% for option in question_data.options %}
-
-
{{ option.value }}
-
0 Antworten
-
+
+
+
+
+
+
{{ option.value }}
+
0 Antworten
+
+
+
{% endfor %}
@@ -36,7 +42,7 @@
{% endif %}
{{ participant.display_name }}
- {{ participant.score }} Punkte
+ {{ participant.score }} Punkte
{% if participant.last_answer_correct %}
✓
@@ -66,6 +72,7 @@
{% block extra_js %}
{% if is_last_question %}
+