Skip to content

Commit

Permalink
🐛 Closes #323
Browse files Browse the repository at this point in the history
  • Loading branch information
mawoka-myblock committed Jan 3, 2024
1 parent 46eb2d9 commit 936ae56
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion classquiz/routers/quiz.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from classquiz.auth import get_current_user
from classquiz.config import redis, settings, storage, meilisearch
from classquiz.db.models import Quiz, User, PlayGame, GameInLobby, QuizQuestion
from classquiz.db.models import Quiz, User, PlayGame, GameInLobby, QuizQuestion, QuizQuestionType
from classquiz.helpers.box_controller import generate_code
from classquiz.kahoot_importer.import_quiz import import_quiz
import urllib.parse
Expand Down Expand Up @@ -105,6 +105,10 @@ async def start_quiz(

if randomize_answers:
for question in quiz.questions:
if question["type"] == QuizQuestionType.RANGE:
continue
if question["type"] == QuizQuestionType.SLIDE:
continue
random.shuffle(question["answers"])

game = PlayGame(
Expand Down

0 comments on commit 936ae56

Please sign in to comment.