Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating a closed book test

Status
Not open for further replies.

essdee

Programmer
Nov 28, 2002
11
IN
Hi all
I have created an e-learning site which contains an Online test. I need to make this as a closed book test, i.e The user should not be able to go through the course content ( Which is in the site ).
Technically what i need is that the user should not be able to press the BACK button of the browser window. If he presses the back button, and then the FORWARD button then the test page should not be available.

All the questions are randomnly selected from the back end.

I am using ASP and SQL Server 7.0
 
use sessions. check the refering page on each page...that way if the user is trying to access a content page and then goes back to the quiz, then you can see this and cancel the quiz...or whatever you want to do to the user...also ensure that your login technique does not allow for multiple logins from the same user/IP to prevent two different instances of the site to be open on the same machine...

other options...
subdomain for the quiz....
another site for the quiz...
Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Hi Bastein
I went through your solution. I have taken care of multiple logins. the snitch with the solution you have given is that if he presses the Back button couple of time and then presses the forward button the referrer page remains correct. What needs to be done is either he should not be able to press the back button and if he presses the back button then his test should be cancelled.

Any ideas???

I can't opt for seperate domain etc..!!
 
set the caching to no cache...it will expire each page so the user cannot go back...do a search on cache and you can gets lots of code

hth
Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
hi basten,
i could not find info as to setting the cache to no chche. Please guide me
 
<%
Response.Expiresabsolute = Now() - 1
Response.AddHeader &quot;pragma&quot;,&quot;no-cache&quot;
Response.AddHeader &quot;cache-control&quot;,&quot;private&quot;
Response.CacheControl = &quot;no-cache&quot;
%> ---------------------------------------
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top