Tutorial :How can I restrict the use of other applications during an online exam?


I have created a online examination web application. I want the users to avoid using browsers (for checking answers in Google).

How should I achieve this? Shall we have the full screen mode, even though I want to restrict minimizing the window or using Ctrl+Tab?

Is it possible?


There is a very simple solution: Set a time limit. Any student who has to browse the web for an answer will lose a lot of time compared to the ones who know the answer immediately.

Another solution: Don't care. It's not your job to make sure that students don't know about the Internet. Your job is to make sure they know their stuff when they start a job. So if a student is not able to memorize something but can look it up on Google? Why not? I'd award her extra points for working smarter rather than harder.


Speaking as a browser user, I hope it's not possible, since it implies that any web site could do the same thing, thus taking control of my computer away from me, against my will.


Write the questions so that they require original reasoning, rather than regurgitating facts.


It is possible, but only through workarounds.

You simply cannot limit the features of the operating system and the running application as unwind said.

But you can implement restrictions by adding an Ajax framework. You can set it to send the answer whenever focus is lost on the window of the examination, thus forcing your students be honest. This also has many downsides, but this is the one way of implementation I can imagine.


In order to reply to comments, I have rethought and improved the idea. Whenever focus is stolen, one has to enter a captcha. This discourages changing browser windows for every single question, and is not really frustrating if happens once in a while.


If the test is held on remote locations there is no chance of locking them informationwise. If you´re in the same room as the participants then you can use something like Operas kiosk mode: http://www.opera.com/support/mastering/kiosk/


I don't think that's possible for the truly web application. If a user is in remote location, he or she can simply use another computer/phone.


If I'm taking a test at home, there's no way of stopping me from taking it at my desk with the two computers (the Linux box, and the dual-boot Mac Mini for OSX and XP), and nothing you do to lock one computer down will matter.

Lots of people have access to more than one computer, either temporarily or permanently. If I didn't have the two computers, I could use my laptop and desktop together. Or my iPhone. Alternately, I could be on the phone with somebody who either knows the subject or who will search the web for me.

Bear in mind that any technological lockdown would have to be seen as fair. One hint of unfairness (such as requiring focus to stay on the test window when an unrelated popup comes) and the students will be even more motivated to bypass your controls.

What you need to do is have some facility where the students will go to in order to take tests. They can proctor and try to make sure there's no use of computers for outside references (although an iPhone is not difficult to conceal). Alternately, you can not have anything major riding on the test. Or design the test to be open-resource.

There's nothing else you can do.


The only practical way is to design the online test so that referring to other materials is hard. It's a design problem, not a technical one. For instance, have a short time limit for the test, and for each answer. I've done a number of tests like this. At the end of the day, if they aren't in a controlled environment they could have any kind of reference - book, friend, etc.


You can't restrict the usage of browser window (minimizing, browsing other sites...) through HTML or javascript. :(


A Java base solution....

Use a thin client full screen application with an html component deployed using Web Start. Here are two options.....

  1. Qt Jambi + WebKit

  2. Swing + xhtmlrenderer

In Swing/AWT, you can check to see if there are more than one monitors. I am sure other langs/toolkits provide that feature.......


use safe exam browser http://safeexambrowser.org/news_en.html. Safe Exam Browser is a webbrowser-environment to carry out online exams safely. The software changes any computer into a secure workstation. It regulates access to resources like system functions, other websites and applications and prevents unauthorised resources being used during an exam


You can't do this with html/javascript.


Only way I am aware of would be:

Explicitly state that switching out of the current tab/window is forbidden beforehand.

Close the exam and declare it void if the rule is violated. (track focus/window resize with JS).

Reliably blocking anything outside the current browser window by JS is impossible. The user can always launch different browser with its own JS engine and do whatever he wants.


This is basically the same as pestaa's answer except that instead of submitting answers when focus is lost, how about changing the questions? So you have a bucket of 100 questions, there are 40 on the test. It shows one at a time and if the window looses focus the questions changes to a new one from the bucket when the window gets focus again...

Just a thought.


From a technology point of view, this is possible. You can detect when the focus is lost using JavaScript's onblur event. You could either log the number of times that the window focus is lost, or attempt to re-focus using the JavaScrip focus() method.

But there are several caveats...

1) JavaScript may be disabled. 2) They may still check for the answer on another device, such as another computer or a mobile phone 3) They may have access to the information via non-electrical means. Another person or a book.

The only way to ensure that there is no outside help is to set the test under exam conditions. This means making it supervised, which ruins the remote nature.

Depending on what this test is for, you could try other well established techniques. Such as using the remote test as an entrance test, with successful students taking a second test under examination conditions.


If you aren't in the room with them, you're probably completely out of luck. As they could just have another laptop beside them which also has a connection to the internet. If they are in the same room, and you do own the computers, there's probably numerous things you could do, such as putting in a hardware firewall that only allows access to the testing website.


You could easily write a .net app using the open-source gecko browser. it has a nice .net wrapper that you can customize (disable user browsing, etc.). It then becomes really easy to prevent the user from switching programs.


Even if there is a reliable method to achieve what you want (and I highly doubt that), it is very, very easy to circumvent. The user simply needs to use a second computer (or even simpler: start the test inside a virtual machine).

So the real answer is to choose a non-technical solution (such as asking questions that require understanding instead of asking easily google-able facts).


You cannot! Javascript does not allow you to restrict the user's actions. But you can of course have some workarounds, like detecting if the document loses focus.


i also create my academic project based an online exam then i use the mouse and keyboard disable option and i success in that and if student open them browser tab then they need to type question manually bcoz they ca't copy the question on write question manually they such west them time........so u can also use the mouse and keyboard disable option........

and for that u use this coding.........

<script type="text/javascript">     function disableRightClick(e)    {      var message = "Right click disabled";          if(!document.rightClickDisabled) // initialize      {        if(document.layers)         {          document.captureEvents(Event.MOUSEDOWN);          document.onmousedown = disableRightClick;        }        else document.oncontextmenu = disableRightClick;        return document.rightClickDisabled = true;      }      if(document.layers || (document.getElementById && !document.all))      {        if (e.which==2||e.which==3)        {          alert(message);          return false;        }      }      else      {        alert(message);        return false;      }    }    disableRightClick();  </script>  <script type='text/javascript'>    document.onkeydown = function (e) {      e.preventDefault();      alert("Not use keyboard")    }  </script>  


Think different. Hack way.

Display at the beginning that people referring to online info will be disqualified . When your exam site loads secretly install a packet sniffer code at the client. From the time the exam starts sniff packets and retreive info. You'll get visited url's during the exam period from that IP. Then, you can know who cheated and who didn't!

But, don't do this. It's against user privacy. You may get sued :-)

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »