Zeit_bisher_im_Backend #76
This commit is contained in:
@@ -9,7 +9,7 @@ class QuizForm(forms.ModelForm):
|
||||
class QuestionForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = QivipQuestion
|
||||
fields = ['quiz_id', 'data', 'time_per_question']
|
||||
fields = ['quiz_id', 'data','time_per_question']
|
||||
|
||||
from django import forms
|
||||
|
||||
|
||||
@@ -210,6 +210,7 @@ def question(request, join_code):
|
||||
return render(request, 'play/game/question_host.html', {
|
||||
'quiz_game': quiz_game,
|
||||
'question_data': question_data,
|
||||
'current_question':current_question,
|
||||
'host_id': quiz_game.host_id,
|
||||
'start_time': int(quiz_game.question_start_time.timestamp() * 1000),
|
||||
'question_index': quiz_game.current_question_index,
|
||||
@@ -229,6 +230,7 @@ def question(request, join_code):
|
||||
return render(request, 'play/game/question_participant.html', {
|
||||
'quiz_game': quiz_game,
|
||||
'question_data': question_data,
|
||||
'current_question':current_question,
|
||||
'participant': participant,
|
||||
'start_time': int(quiz_game.question_start_time.timestamp() * 1000),
|
||||
'question_index': quiz_game.current_question_index,
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
const joinCode = '{{ quiz_game.join_code }}';
|
||||
const hostId = '{{ host_id }}';
|
||||
const questionStartTime = {{ start_time }};
|
||||
const questionDuration = 30000; // 30 seconds in milliseconds
|
||||
const questionDuration = '{{ current_question.time_per_question }}'*1000; //Zeit pro Frage (indviduell eingestellt)
|
||||
const gameSocket = initializeGameSocket(joinCode);
|
||||
let answeredParticipants = 0;
|
||||
let totalParticipants = 0;
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
const joinCode = '{{ quiz_game.join_code }}';
|
||||
const participantId = '{{ participant.participant_id }}';
|
||||
const questionStartTime = {{ start_time }};
|
||||
const questionDuration = 30000; // 30 seconds in milliseconds
|
||||
const questionDuration = '{{ current_question.time_per_question }}'*1000; //Zeit pro Frage (indviduell eingestellt)
|
||||
const gameSocket = initializeGameSocket(joinCode);
|
||||
|
||||
gameSocket.onmessage = function(e) {
|
||||
|
||||
Reference in New Issue
Block a user