Fausto Busuito commited on
Commit
7e8a856
·
1 Parent(s): 7b4ae91

Application changes

Browse files
Files changed (1) hide show
  1. app/static/script.js +8 -6
app/static/script.js CHANGED
@@ -224,15 +224,17 @@ document.getElementById('end-session').addEventListener('click', () => {
224
  resultsContainer.style.display = 'block';
225
  });
226
 
 
227
  document.getElementById('restart').addEventListener('click', () => {
228
- document.getElementById('results-container').style.display = 'none';
229
- document.getElementById('file-selection').style.display = 'block';
230
  document.getElementById('quiz-container').style.display = 'none';
231
- currentIndex = 0;
232
- questions = [];
233
- userAnswers = [];
234
- document.getElementById('file').value = ''; // Reset file selection
235
  });
 
 
236
  function updateTimer() {
237
  const elapsedTime = Math.floor((Date.now() - startTime) / 1000);
238
  const hours = String(Math.floor(elapsedTime / 3600)).padStart(2, '0');
 
224
  resultsContainer.style.display = 'block';
225
  });
226
 
227
+ // Aggiungi l'event listener per il pulsante "Restart" (Return to Start)
228
  document.getElementById('restart').addEventListener('click', () => {
229
+ // Nascondi il contenuto del quiz e i risultati
 
230
  document.getElementById('quiz-container').style.display = 'none';
231
+ document.getElementById('results-container').style.display = 'none';
232
+
233
+ // Mostra il contenitore per la selezione del file
234
+ document.getElementById('file-selector-container').style.display = 'block'; // Assicurati che ci sia un contenitore per la selezione del file
235
  });
236
+
237
+
238
  function updateTimer() {
239
  const elapsedTime = Math.floor((Date.now() - startTime) / 1000);
240
  const hours = String(Math.floor(elapsedTime / 3600)).padStart(2, '0');