Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

145
Views
¿Cómo puedo permitir que mi código guarde automáticamente las respuestas seleccionadas si el tiempo dado ha terminado y el examinador no ha enviado las respuestas?

en mi aplicación quiz Django, las citas se cargan todas en una página y funciona cuando el estudiante comienza el examen, el tiempo está en cuenta regresiva y cuando termina, cierra la página del examen y redirige a la página de resultados y si el tiempo ha terminado sin el envío, el código actual devuelve el resultado anterior o cero, pero lo que quiero es realizar un seguimiento de las respuestas seleccionadas (si el estudiante seleccionó algunas respuestas pero no las envió), ¡debe evaluarse y dar ese resultado! aquí está mi código de script java

 <script> function saveAns(){ var ele = document.getElementsByTagName('input'); for(i = 0; i < ele.length; i++) { if(ele[i].type="radio") { if(ele[i].checked){ setCookie(ele[i].name,ele[i].value,3) } } } } function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+ d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } window.onload = function begin(){ document.getElementById('timer').innerHTML = {{quiz.time_limit_mins}} + ":" + 00; startTimer(); } function startTimer() { var presentTime = document.getElementById('timer').innerHTML; var timeArray = presentTime.split(/[:]+/); var m = timeArray[0]; var s = checkSecond((timeArray[1] - 1)); if(s==59){m=m-1} if(m<0){ document.getElementById('quiz').submit(); } document.getElementById('timer').innerHTML = m + ":" + s; setTimeout(startTimer, 1000); } function checkSecond(sec) { if (sec < 10 && sec >= 0) {sec = "0" + sec}; // add zero in front of numbers < 10 if (sec < 0) {sec = "59"}; return sec; } </script>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!