ruslanmv commited on
Commit
148d537
1 Parent(s): 91f4d25
Files changed (2) hide show
  1. app.py +3 -0
  2. static/script.js +1 -3
app.py CHANGED
@@ -74,6 +74,9 @@ def start_quiz():
74
  emit('new_question', {"question": question["question"], "options": question["options"], "index": index + 1}, room='quiz')
75
  emit('enable_end_quiz', room=request.sid) # Enable "End Quiz" for the host
76
 
 
 
 
77
  @socketio.on('restart_quiz')
78
  def restart_quiz():
79
  reset_quiz()
 
74
  emit('new_question', {"question": question["question"], "options": question["options"], "index": index + 1}, room='quiz')
75
  emit('enable_end_quiz', room=request.sid) # Enable "End Quiz" for the host
76
 
77
+
78
+
79
+
80
  @socketio.on('restart_quiz')
81
  def restart_quiz():
82
  reset_quiz()
static/script.js CHANGED
@@ -51,11 +51,9 @@ function updateSliderValue(value) {
51
  }
52
 
53
  function startQuiz() {
54
- const startQuestion = parseInt(document.getElementById('start-question-number').value, 10);
55
- socket.emit('start_quiz', { start_question: startQuestion });
56
  }
57
 
58
-
59
  function checkAnswers() {
60
  socket.emit('check_answers');
61
  }
 
51
  }
52
 
53
  function startQuiz() {
54
+ socket.emit('start_quiz');
 
55
  }
56
 
 
57
  function checkAnswers() {
58
  socket.emit('check_answers');
59
  }