vault backup: 2025-12-26 02:09:22
All checks were successful
Deploy Quartz site to GitHub Pages / build (push) Successful in 2m29s
All checks were successful
Deploy Quartz site to GitHub Pages / build (push) Successful in 2m29s
This commit is contained in:
14
stroma/quiz/views/quiz_mode_view.py
Normal file
14
stroma/quiz/views/quiz_mode_view.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
from quiz.models import QuizSession
|
||||
from .get_session_questions_view import get_session_questions
|
||||
|
||||
|
||||
def quiz_mode(request, session_id):
|
||||
"""Dedicated quiz mode view"""
|
||||
session = get_object_or_404(QuizSession, id=session_id, user=request.quiz_user, is_active=True)
|
||||
total_questions = get_session_questions(session).count()
|
||||
return render(request, 'quiz_mode.html', {
|
||||
'session': session,
|
||||
'total_questions': total_questions
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user