Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End make time for view page !

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #41193
    amis
    Participant

    I make online Exams system with php and mysql

    I want to make visitor to see page of exam for certain time for example 30min

    and after 30 min (page die of redirect to main page)

    #116492
    duncanmcdougall
    Participant

    You could [redirect with JavaScript](http://ntt.cc/2008/01/21/5-ways-to-redirect-url-with-javascript.html “redirect with JavaScript”) but that may be only half a solution as you can always turn JS off.

    If your exams consist of multiple short questions you could store exam start time in a session and show questions one at a time, maybe using AJAX or simply separate pages. On the back end at each question request you check the time elapsed and die if expired. Combine this with a time left timer and a JavaScript redirect to redirect mid way through questions. If JS is off and they submit a question after 30 minutes has passed then you simply discard the answer to that single question. I hope that helps.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.