Zeit_bisher_im_Backend #76
This commit is contained in:
@@ -210,6 +210,7 @@ def question(request, join_code):
|
|||||||
return render(request, 'play/game/question_host.html', {
|
return render(request, 'play/game/question_host.html', {
|
||||||
'quiz_game': quiz_game,
|
'quiz_game': quiz_game,
|
||||||
'question_data': question_data,
|
'question_data': question_data,
|
||||||
|
'current_question':current_question,
|
||||||
'host_id': quiz_game.host_id,
|
'host_id': quiz_game.host_id,
|
||||||
'start_time': int(quiz_game.question_start_time.timestamp() * 1000),
|
'start_time': int(quiz_game.question_start_time.timestamp() * 1000),
|
||||||
'question_index': quiz_game.current_question_index,
|
'question_index': quiz_game.current_question_index,
|
||||||
@@ -229,6 +230,7 @@ def question(request, join_code):
|
|||||||
return render(request, 'play/game/question_participant.html', {
|
return render(request, 'play/game/question_participant.html', {
|
||||||
'quiz_game': quiz_game,
|
'quiz_game': quiz_game,
|
||||||
'question_data': question_data,
|
'question_data': question_data,
|
||||||
|
'current_question':current_question,
|
||||||
'participant': participant,
|
'participant': participant,
|
||||||
'start_time': int(quiz_game.question_start_time.timestamp() * 1000),
|
'start_time': int(quiz_game.question_start_time.timestamp() * 1000),
|
||||||
'question_index': quiz_game.current_question_index,
|
'question_index': quiz_game.current_question_index,
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
const joinCode = '{{ quiz_game.join_code }}';
|
const joinCode = '{{ quiz_game.join_code }}';
|
||||||
const hostId = '{{ host_id }}';
|
const hostId = '{{ host_id }}';
|
||||||
const questionStartTime = {{ start_time }};
|
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);
|
const gameSocket = initializeGameSocket(joinCode);
|
||||||
let answeredParticipants = 0;
|
let answeredParticipants = 0;
|
||||||
let totalParticipants = 0;
|
let totalParticipants = 0;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
const joinCode = '{{ quiz_game.join_code }}';
|
const joinCode = '{{ quiz_game.join_code }}';
|
||||||
const participantId = '{{ participant.participant_id }}';
|
const participantId = '{{ participant.participant_id }}';
|
||||||
const questionStartTime = {{ start_time }};
|
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);
|
const gameSocket = initializeGameSocket(joinCode);
|
||||||
|
|
||||||
gameSocket.onmessage = function(e) {
|
gameSocket.onmessage = function(e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user