skankhunt42
skankhunt42

Reputation: 103

Auto redirect when timer ends in rails server side

I am making an online examination web-app in rails and I want the user to redirect to a link when the time finishes to end the test (say 25 minutes after start time).

I have implemented a client side countdown timer using FlipClock.js which automatically redirects to the end test link when the timer reaches zero. I know the user can turn off javascript in their browser, so I wanted a server side solution which does something similar.
I am storing start_time in my database.

Upvotes: 0

Views: 282

Answers (1)

Arvinje
Arvinje

Reputation: 328

I think you can redirect any user who reloads the page (or submits the test) after 25 minutes to that link. But I'm afraid you cannot redirect user in the middle of the test without any JS.

p.s. you can always consider banning the test for JS-disabled browsers.

Upvotes: 1

Related Questions