The integration of the proctoring system with the LearnDash LMS is done using the Supervisor SDK (JavaScript proctoring library) along with a custom script that ensures that quiz element is accessible only when a proctoring is running. You need to place the custom SDK code on the quiz page using a Custom HTML element in LearnDash LMS.
Navigate to a quiz section and either create a custom quiz or modify predefined.
As an example, we’ll use the first quiz (Doing more with LearnDash Quiz):
Access to the quiz can be configured via the settings menu, where associated courses can be populated, along with the quiz schedule, registration requirement, other quiz dependencies, etc. For example purposes we have removed any requirements as demonstrated on the screenshot below:
On the quiz page ensure that you are in the edit mode:
Add a block for a custom HTML element using a dropdown menu (right-click on the quiz page):
Once a block has been added, click on the “+” icon and search for a Custom HTML element using the search bar:
Now you need to add a custom JS script in the newly added custom HTML block which will prevent accessing a quiz until proctoring is successfully started and click the “Save” button.
<script src="https://demo.proctoring.app/sdk/supervisor.js" data-supervisor="init"></script>
<script>
document.body.querySelector('.learndash-wrapper').style.display = 'none';
if (window.supervisor) {
supervisor.on('start', function() {
document.body.querySelector('.learndash-wrapper').style.display = '';
});
}
</script>
NOTE: You need to replace "demo.proctoring.app" with the domain of your proctoring server in the script code.
Now, when a test-taker navigates through the proctoring link, they will begin to take an associated quiz according to the proctoring workflow. Clicking on the proctoring link takes an administrator or teacher to the proctoring interface, where they can access all sessions and their reports created by that link.