Bewertungen verstecken wenn keine vorhanden und Möglichkeit zum deaktivieren von Bewertungen

This commit is contained in:
Juhn-Vitus Saß
2025-04-22 18:28:50 +02:00
parent a16c97c4f3
commit 154110e510
6 changed files with 27 additions and 6 deletions

View File

@@ -2,9 +2,10 @@ from django.utils import timezone
from django.shortcuts import render
from django.shortcuts import render, redirect, get_object_or_404, reverse
from play.models import QuizGame, QuizGameParticipant
from library.models import QivipQuiz, QivipQuestion
from library.models import QivipQuiz
from django.http import HttpResponseRedirect, HttpResponseNotFound
from django.contrib import messages
from django.conf import settings
import json
@@ -144,7 +145,8 @@ def finished(request, join_code):
context = {
'join_code': join_code,
'is_host': str(game.host_id) == str(request.session.get('host_id')),
'participant_id': participant_id if participant else None
'participant_id': participant_id if participant else None,
'rating_enabled': settings.QIVIP_CONFIG['ENABLE_RATING_SYSTEM']
}
return render(request, 'play/game/finished.html', context)
except QuizGame.DoesNotExist: