Zwischenstand Lernmodus

This commit is contained in:
ben8
2025-04-14 20:23:47 +02:00
parent 9d9e1527f4
commit 5b4c76a1c8
2 changed files with 50 additions and 4 deletions

View File

@@ -84,6 +84,13 @@ def create_game(request, quiz_id):
game.quiz_id = quiz
game.host_id = game.generate_unique_id()
game.save()
participant = QuizGameParticipant()
participant.display_name = "DU"
participant.participant_id=game.host_id
participant.quiz_game = game
participant.score = 0 # Initialize score
participant.save()
response = HttpResponseRedirect(reverse('play:lobby', kwargs={'join_code': game.join_code}))
response.set_cookie('host_id', game.host_id, max_age=3600)