Solved

Stopping user to return to the previous page

Posted on 2008-10-04
4
187 Views
Last Modified: 2013-12-12
Hi,
I am working on an online assessment test:
3 test pages, with form inputs (multiple choice). Tests taken one after the other (English, Maths and Science). The users sing in and login before they can start the tests.
Is there any way to stop the user to go back to the test page they have completed and left, without restricting their access to the test pages not yet accessed.
0
Comment
Question by:Erikal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 22641245
somewhere in your db you should be tracking the responses supplied by specific users. So when a user logs in successfully, obtain a list of the pending tests only and save it to a session variable. So if a user decides to go to "test1" page and that page is NOT in your session variable, then redirect to some other page(perhaps one that will show them the allowed tests they can take).
0
 
LVL 14

Expert Comment

by:ali_kayahan
ID: 22641274
In addition to storing tracks in DB and sessions you can set cookies to prevent logging same page from other browsers.
0
 
LVL 9

Expert Comment

by:syedasimmeesaq
ID: 22641600
I think easiest way would be if you set a complete field in you mysql db for English, Math and Science. When the user finish the test, make sure your mysql db gets updated. you can send a hidden value on update to mysql.
ok so then how to prevent the users going back? Put a check on each of your page at the top
something like this

if($row["complete"]==1) {
// redirect them
} else
{
//your test
}

hope this helps
0
 

Author Closing Comment

by:Erikal
ID: 31503046
Thank you very much. You have been a fantastic help.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question