Secure Browser for testing on Moodle using Chromebooks or Win/Mac

We recently set up a secure browser for our student chromebooks so that when they take quizzes/tests they can’t open up any other tabs/windows or take screenshots.
They steps involved:

A. Turn on the Safe Browser Option in Moodle

Go to Site Administration->Development->Experimental and check the box


(You can also just search the administration settings for “Safe”
I don’t know what version of Moodle this feature was added, but it was part of the Core Moodle code, so you don’t need to worry about 3rd party plugins.

B. Create a Chromebook Kiosk app

Here is a link to a copy of my complete kiosk mode app (updated February 22, 2018)
To change it for your site you will need to download the folder and remove the copy of from all the names. Then edit a few of the files:

in the application.html file

  1. change the title to be the name of your site
  2. in the webview line change the src=“” address to be the address of your site

in background.js you could change the ‘id:’ field to be the name of your site (I don’t think this step will have an impact, but might as well put your school name there)

Then you will need to publish this app by zipping this folder and uploading it to the chrome developer site
I published my app as private to our school domain.

C. Push the kiosk app out to student Chromebooks and blacklist user-agent switching apps in the Chrome web store and/or install the Safe Exam Browser on Windows/Mac

  1. Go to Chrome Management > Device Settings > Kiosk Settings > Single App Kiosk, select Allow Single App Kiosk for devices in the organizational unit you select.
  2. Click Manage Kiosk Applications. In the dialog that appears select the exam kiosk app you want to use. You can search for it on the Chrome Web Store, or manually install it if you have the app ID and URL by selecting Specify a Custom App.
  3. Make sure the devices you want to administer the exam with are under the organizational unit you select for the kiosk app.
  4. Then student chromebooks will get an Apps menu on the login screen with your secure browser which opens to your moodle site.
  5. Now blacklist user-agent switching so tricky students can pretend to be the safe browser even when they are not
  6. For windows/mac go to You will then need to configure the settings to point to your site.

D. Done

Now teachers can set up a quiz with the Safe Browser option turned in the quiz settings page under Extra Restrictions on Attempts. If students try to take the quiz while logged in normally, they will be told they need to use the Safe Exam Browser.
To use the safe exam browser kiosk app, students must log out of their chromebooks and look for an Apps menu in the bottom left menu bar. They then launch the secure browser and log into Moodle normally to take the quiz. Once they are done, they close the secure browser mode and then can log into the Chromebook normally to do other work.


  1. 1
    Joe Liaw ( User Karma: 1 ) says:

    Hi Colin:

    This looks amazing–the Secure Exam Browser integration with Moodle works like a charm on our Windows / Mac machines with the SEB Browser, but getting it to work on Chromebooks has been our pain point in getting a solution fully working.

    Is there any chance you could post your code again that works? The source code you have shared has been modified, and the modified code does not work when we try and push it out to our Chromebooks (it hangs on the loading screen when the Kiosk app is launched).



  2. 0 ( User Karma: 0 ) says:

    Thanks for sharing this Colin. I remember seeing your Moodle presentation at CUE in Palm Springs years ago. My teachers here in Torrance are excited to use the secure browser.

  3. 0
    Joe Liaw ( User Karma: 1 ) says:

    Colin: wanted to report I solved the timer issue getting “chopped off”–turns out it wasn’t anything to do with the Kiosk code, but needing to modify the CSS of the theme to move the timer up the page so it doesn’t get cropped within the Kiosk mode.

    Wanted to share this tip in case you ever run into this issue, and it might help someone else out!

    Thank you again for sharing your brilliant work with the Open Source community–you already are making our Test Center proctor much happier since she is a very busy woman at the end of each marking term!!!

  4. 0
    Joe Liaw ( User Karma: 1 ) says:

    Hi Colin:

    Quick question (though don’t know if you have an easy answer):

    I just gave my first exam using your source code for the Secure Exam browser on our Chromebooks, and it works AWESOME! Easy to use for students and teachers since it’s just using Moodle and it’s only 1 more button teachers need to check!!!

    One issue though: in Moodle you can set a time limit for quizzes, and normally it shows up as a pop-up in the bottom left corner of the screen–in the Secure Exam browser kiosk mode on the Chromebooks the timer gets “chopped” off on the screen and students can’t see it….any ideas on how to adjust the code so that the timer shows up?

    Thanks again for all your help and for sharing your great work with the Moodle / Chromebook community!


  5. 0
    Joe Liaw ( User Karma: 1 ) says:

    Hi Colin:

    Just wanted to report back that your original source code works PERFECTLY!!! THANK YOU!
    Don’t know if you saw the article in the recent NEA Magazine surveying high school students using phones to cheat during an exam–1/3 self-reported regularly cheating, and 2/3 self-reported seeing cheating happening regularly.

    Your solution will help both teachers and students tremendously, while letting teachers feel more comfortable with mastery learning and allowing students to retake unit exams to demonstrate growth and mastery!

    Thank you!

  6. 0
    Joe Liaw ( User Karma: 1 ) says:

    Hi Colin:

    Thanks for your quick reply….I will work with our systems admin and report back to you to let you know how things go….

    –Joe 🙂

  7. 0
    Colin ( User Karma: 0 ) says:

    Hey Joe,
    Thanks for letting me know. I uploaded my current code and updated the link in the blog. Let me know if it works or not now.

  8. 0
    Kees says:

    I don’t understand this cookbook. We use Chromebooks. Where do I install the SafeExamBrowser?

  9. 0
    JP says:

    Just tried this with Moodle 3.0+ and we are getting the message that “This Quiz has been set up so that it may only be attempted using the Safe Exam Browser. You cannot attempt it from this web browser.” Any idea of what the issue maybe? Thanks.

Leave a Reply