If you administer exams in Moodle, this guide is for you. It covers one thing end to end: putting ProctorSafe on a Moodle exam page, and proving it works before a single candidate sits the exam.
There is a shorter, platform-agnostic version of this in the under-one-hour technical guide, and a Moodle section inside the Moodle, Canvas and Blackboard guide. This article is Moodle-only and goes deeper on placement and on pre-flight verification.
What the integration actually is
A script tag on the exam page. That is the whole thing.
ProctorSafe does not authenticate the candidate, and it does not manage your course, your enrolments or your quiz settings. Moodle keeps doing all of that. What ProctorSafe adds is a session: a set of integrity checks that run in the candidate's browser while the exam is open, and a timeline of what happened that a reviewer can look at afterwards.
Three consequences follow, and they are worth being clear about before you deploy anything.
The candidate never leaves Moodle. There is no redirect to a separate proctoring site, no separate login, and no second window. The script runs on the page Moodle already served, so the exam and the monitoring are the same page. That is a large part of why adoption is easier: candidates are not being asked to trust a new system with their exam.
Nothing is installed. No plugin to install site-wide, no browser extension, no desktop app, no server-side component to deploy on your infrastructure. There is one <script> element and a few lines of JavaScript.
There is no Moodle plugin and no LTI launch today. We will not dress this up: LTI 1.3 and LTI Advantage platform-to-tool launches are not available today. If you were expecting a Moodle plugin you install from the plugins directory, that does not exist. The script-tag model is the integration, and it is the whole of it.
If your Moodle site authenticates candidates through LTI, that is still the right place to authenticate them. LTI is how the candidate is identified before the exam page loads; it is not how the proctoring session is launched.
Where the tag goes in Moodle
Option one: the exam page itself
Moodle exam pages built with the HTML block, or with an "IFrame/HTML" resource type, accept the script tag directly in the block editor's HTML source view. Switch the editor to source view and paste the tag into the block's HTML.
This is the right choice when you want proctoring on one specific exam and nowhere else. The tag sits with the exam content, so it travels with the activity when you copy it into another course.
Option two: the theme footer
For a course-wide rollout, add the script tag once to your theme's page footer so every quiz activity picks it up. One change covers every exam on the site.
The trade-off is scope. A theme footer reaches every quiz activity, including practice quizzes and low-stakes tests you did not mean to proctor. If that matters, scope the tag yourself: check the URL path in your own wrapper code and only start a session on the exam pages you want covered. That is the same pattern the Canvas guide describes for Canvas themes.
Note the Moodle admin path the existing guide also refers to: Admin → Themes → Edit CSS/JS. That route is the equivalent of the Canvas custom JavaScript file, and it is where a site-wide custom JavaScript file belongs if you prefer to keep the tag out of the theme's footer markup.
The tag itself
<script src="https://your-deployment.example.com/sdk/proctor.iife.js"></script>
The SDK auto-loads its own dependencies, including the face-detection model and its WASM module, the first time it runs. Everything runs client-side.
Starting the session
The candidate is already authenticated by Moodle by the time the page loads, so your page can start a session directly:
const sessionId = await Proctor.start(
{
tenantName: 'your-tenant-slug',
applicationReference: 'moodle-exam-2026-final',
settings: {
hudMode: 'full',
},
},
(event) => {
console.log('Proctor event:', event);
}
);
console.log('Session started with ID:', sessionId);
tenantName and applicationReference are required. applicationReference identifies the attempt, so it should be unique per attempt rather than shared across a whole exam sittings. The full parameter list is in the integration guide.
One thing to know about the split of responsibilities: detection settings are not set from your page. They live in named proctoring profiles that your ProctorSafe administrator creates in the dashboard, and your page selects one by name with proctoringProfile. That is deliberate. It means a candidate cannot weaken a detection by editing the page.
Verifying it works before the exam
This is the part that decides whether your exam day goes well.
A misconfigured script tag does not fail loudly for you. It produces a candidate who sits down, clicks start, and cannot begin the exam, with a browser console message nobody will read in time. So verify it yourself first, in a browser, on a real exam page, before the sittings.
The pre-flight checklist
Work through these in order. Each one is a link in the chain from "script tag" to "live session", and each one fails in a way that is easy to miss.
1. The SDK script loads from your own origin. Open the exam page, open the browser developer tools, and look at the network tab for proctor.iife.js. It should return a 200 and come from your ProctorSafe deployment, not from a third-party CDN. If it 404s, the path or the deployment URL is wrong.
2. Your origin is on the tenant's allowed origins list. This is the setting most often missed. The SDK only talks to ProctorSafe from origins you have listed; until you add yours, every session start is refused by CORS. Add the scheme and host of your Moodle site under Settings → Network & Origins in the dashboard. Wildcards like *.your-company.com are accepted for subdomains, and port variations are handled automatically, so http://localhost also matches http://localhost:3000 when you are testing locally.
3. The API endpoint is reachable. The endpoint is derived automatically from the origin the SDK script was loaded from, so this normally follows from step one. It is worth confirming explicitly, though, because a proxy in front of your Moodle site that blocks the request produces the same symptom as a missing tag.
4. Proctor.start() reaches the handshake. This is the real test. From the browser console on your exam page, with the SDK loaded, start a session and confirm it resolves:
const sessionId = await Proctor.start({
tenantName: 'your-tenant-slug',
applicationReference: 'moodle-preflight-check',
});
console.log(sessionId);
If it resolves, the whole chain works: script loaded, origin allowed, endpoint reachable, handshake signed and accepted. If it rejects, the error message names the problem. Origin not allowed is a CORS list issue. A signature error means your tenant has the signature requirement enabled, which is on by default; see the integration guide for how your backend produces the signature, or ask your administrator to turn it off for a trial.
5. The requirements check passes. Before a real sitting, also run await Proctor.checkRequirements(). It reports camera access, microphone access, browser support and whether the device is fast enough to run on-device analysis. A degraded device performance result is advisory: it does not fail the check and it does not block the candidate, but it does tell you something useful about the hardware your cohort is likely to be on.
Use the reference example page
There is a working example page shipped with the SDK: /example.html. It is a single self-contained page that exercises the flow end to end. You can paste in a tenant slug, an API key and an endpoint, then walk through the whole sequence: check requirements, start a session, watch events arrive in a live timeline, mark custom events, start and end sections, end the session and read the summary.
Two practical uses. First, it proves your account, your keys and your network path work before you touch Moodle at all. Second, it gives you a reference for the Proctor.start() call, the event callback and the session lifecycle, so you are writing the Moodle integration against something that runs.
Use it against a test application reference, and remember that each applicationReference can normally only be used once.
What a Moodle administrator still has to do
Honest expectations matter more than a short list.
Placement, per course or per exam. Somebody has to decide which exams are proctored and put the tag on them. If you use the theme footer, that decision is made once but applies broadly, so it needs a scoping rule. If you use the block editor, the decision recurs every time an exam is set up, and it will be forgotten at least once. Write the rule down somewhere the teaching team will actually see it.
Starting the session from your page. The tag loads the SDK; it does not start a session by itself. Something has to decide when the attempt begins and call Proctor.start(), usually when the candidate opens or begins the quiz. That is your page's job, and it is where most Moodle integration bugs live.
Storing the session id. Proctor.start() returns the session id. Store it against your own exam record, so a flagged session can be matched back to a candidate in Moodle. You are the only party that knows who sat which attempt; that mapping stays with you.
Keeping Moodle in charge of identity. ProctorSafe does not know who the candidate is. Your Moodle enrolment data, your candidate record and the session id are what connect a person to a sitting. Design that join deliberately, because it is also the join a DPO will ask about.
Where the review happens. In the ProctorSafe reviewer dashboard, not in Moodle. A reviewer works through a session's timeline there, and the outcome is recorded there with an audit trail. Moodle has no view of this, and the reverse also holds: your exam results live in Moodle. If you need the outcome in your gradebook, plan for that wiring.
Candidate-facing guidance. Tell candidates what will happen before the exam. What is monitored, what is not, and what a reviewer will see. The candidate-facing warnings article covers how warnings are surfaced in the browser, and candidates who understand the mechanism object far less often than candidates who are surprised by it.
Why a script tag, and not an iframe
We recommend the script tag on the exam page, and it is worth being precise about why, because "we embed in an iframe" is a common shape and we are deliberately not recommending it.
An iframe puts the SDK in a different document. Several of the checks depend on the page context: whether the page is visible or hidden, whether the window has focus, whether the browser UI is open inside an unchanged window, how the page's own key and paste events are handled. Embedded in a frame, some of those signals are degraded, incomplete or silently absent.
The script tag has no such problem. The SDK runs in the same document as the exam, on the page Moodle served, so the whole detection set behaves as designed. The integration guide covers the details of what the SDK analyses; the article on how the SDK works covers what stays on the candidate's device and what leaves it.
The practical trade-off is that you are putting a script on your exam page, which means your own IT and security review has to look at it. That is a real cost and we will not pretend otherwise. What you get in exchange is that every detection keeps working, the candidate stays in Moodle, and there is no plugin to maintain across Moodle upgrades.
Rolling out
A sequence that has worked for institutions moving from one model to another:
- Pilot on a single low-stakes quiz with a small group, and verify the session start in the reviewer dashboard before you trust it.
- Confirm the origin list covers every host your cohort will actually use, including a staging host if you have one.
- Publish candidate-facing guidance, and publish it before the first proctored sitting rather than after.
- Roll out course by course, so a mistake is contained to one course.
- Watch incident quality after launch. Reviews of the first cohorts tell you whether your thresholds fit your exams, and that is much cheaper to learn from a small pilot than from a full sitting.
The migration guide covers the same ground for institutions replacing an existing vendor, and the reviewer tooling guide explains what your reviewers will be looking at once sessions start arriving.
The integration documentation covers the SDK in full, and the under-one-hour guide is the fastest route if you want the whole sequence in one place.