Forums Register Login

OnLine Test--Project

+Pie Number of slices to send: Send
I'm working on OnLine test.I need the functionality that if the user gets disconnected,he can continue his test from where he had left after logging again.I've the ID of the user.How to I save his ID on the server for limited amount of time say-1hr.
Please help me.
Sandeep
+Pie Number of slices to send: Send
There are several ways to do this, depending on whether you prefer the client machine to look after the timing, or the server. If you are using cookie sessions, you can set them to expire after a certain amount of time, so after that time, the client machine won't have your session cookie and will have to log in again.
If you don't want to use cookie sessions, then you can fairly easily attach a "last accessed" timestamp to each user record, and check/update it whenever they submit a page request. If the difference between time now and last accessed time is less than the cutoff period, update the last accessed time to now, and continue. if the time difference is more that the cutoff period, throw away the session and require a new log in.
+Pie Number of slices to send: Send
Hello,
Can Frank or Sandeep please tell me how do you Time Stamp a Record?
I know , that if a session is still valid, one can get the last accessed time , compare it and invalidate the session if required. But how to do this Time Stamping ?
I would really aprreciate the answer with a line or two of the actual code.
Thanx,
Milan
Hey, check out my mega multi devastator cannon. It's wicked. It makes this tiny ad look weak:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 943 times.
Similar Threads
Resource-Local EntityManagers with EntityTransaction
how close is Whizlabs mocks to real SCEA part 1
How to develop a secure website
indian online shopping site...
How to authenticate a user using open Id after logging in the system
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:24:52.