The integration of the OctoProctor proctoring system with Moodle LMS is carried out using IMS LTI technology. Versions of Moodle 3.x and higher are supported.
A valid SSL certificate must be installed on the Moodle web server so that the system pages open using the HTTPS protocol. You can check the validity of the certificate on your server using the SSLChecker.com service. This is a requirement for a browser security policy that does not allow you to access the camera and microphone via an unprotected HTTP protocol. You can also issue a free Let's Encrypt SSL certificate.
Since Chrome 80, the SameSite browser security policy has been tightened and by default when the page is opened in IFRAME, cookies are not sent. In this regard, it is necessary that the version of Moodle be at least 3.5.11, 3.6.9, 3.7.5, 3.8.2, because starting with only these versions the corresponding correction MDL-67175 has been made. An already configured assembly of the latest version of Moodle can be obtained from the Bitnami resource page. If it is not possible to update the Moodle version, then you need to add to the ".htaccess" file (in the Moodle root directory on the server) a block of settings that change the response headers of the web server through the mod_headers module for Apache:
.htaccess
<IfModule headers_module>
Header edit Set-Cookie (.*) "$1; Secure; SameSite=none"
</IfModule>
The "headers" module must be included in Apache, for this you can use the "a2enmod headers" command.
Sometimes a "Message signature not valid" or "Missing or invalid consumer key or access token" error may occur when submitting a proctoring assessment to Moodle via the LTI Outcome Service. This error is due to an incorrectly configured server.
It is important that the time on the Moodle server is set correctly, otherwise OAuth authorization in LTI will not work.
This error could also be due to lack of ability to read the "Authorization" header in PHP. To fix this you can add the following rule to the Apache configuration file in the
httpd.conf
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
If this does not work, Moodle forum recommends adding the following mod_rewrite Apache rule to the ".htaccess" file (in the root Moodle directory of the server):
.htaccess
<IfModule rewrite_module>
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.+)
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
The "rewrite" module must be enabled in Apache, you can use the "a2enmod rewrite" command to do this. The Moodle directory must support parameter overrides from the .htaccess file:
httpd.conf
<Directory />
AllowOverride All
Options FollowSymLinks
</Directory>
In order to display the Moodle page in the frame of the proctoring system, the option "Administration" → "Security" → "HTTP Security" → "Allow frame embedding"
must be enabled under the user with the role "Administrator":
In the section "Site administration" → "Plugins" → "Activity modules" → "External tool" → "Manage tools"
you need to go to the link "configure a tool manually"
. And there you need to specify the following parameters:
Optionally you can set up a proctoring session to automatically end when an assessment item is completed in Moodle. By default the session is terminated using the "Finish" button in the top proctoring panel (when the "finish" add-on is enabled) and is not associated with the completion of the assessment.
To set up automatic session completion you need to add a special JavaScript script to the Moodle page by adding the following code in the "Administration" → "Appearance" → "Advanced HTML" → "Before the closing BODY tag" field
:
HTML+JS
<script src="//demo.proctoring.app/sdk/supervisor.js" data-supervisor="sync"></script>
<script>
if (window.supervisor) {
supervisor.on('load', function (iframe) {
const { pathname, search } = iframe.contentWindow.location;
if (pathname.endsWith('/mod/quiz/review.php') ||
(pathname.endsWith('/mod/assign/view.php') &&
search.includes('action=view'))
) {
supervisor.stop();
}
});
}
</script>
where "demo.proctoring.app" is the domain of your proctoring server.
You also need to change the external tool setting by adding the "redirect" parameter to the tool URL so that it looks like this:
https://demo.proctoring.app/api/auth/moodle?redirect=https://your-moodle-domain/
where "your-moodle-domain" is the domain of your Moodle server.
The automatic proctoring will terminate when the attempt view page opens after the assessment is completed, this page must be enabled in the assessment item settings "Review options" → "Immediately after the attempt" → "The attempt"
.
Now when the user is logged in they will be redirected back to the Moodle page where proctoring starts and the proctoring-related assessment item opens in IFRAME. Once the assessment item is completed the proctoring will also automatically exit.
In the settings of the assessment element find "Extra restrictions on attempts" → "Browser security"
, set it to "None"
, otherwise Moodle will open the assessment in a new window and this behavior is blocked by IFRAME.
You should find the assessment element in the course, right-click on it and select "Copy link address". This link will be necessary when setting up the proctoring element.
For each assessment element to which you want to connect proctoring, you need to add a new element "Proctoring" (created by the administrator in section 1.5). This requires the role of "Manager" and edit mode switched on. You need to add a proctoring element to a topic separate from the assessment element so that later you could hide the assessment while maintaining access to it.
After you select an external tool, you will be asked to enter the name of the course element. This title will be displayed in Moodle and the proctoring system.
Next, you need to click "Save and return to course".
Configure the proctoring element by specifying the relevant parameters in the "Custom parameters" field in the format KEY=VALUE:
This URL is a link to the assessment item (see the section 2.2) that the proctoring system will open in IFRAME as soon as the session starts (if not specified, the course page where the proctoring item is located will open in IFRAME).
Here you need to specify a template identifier (from the "identifier" field) to use when creating proctoring sessions (if not specified, the template with the "default" identifier will be used). The settings in the specified template are used to create the individual session for each test-taker. The template must be created in advance in the proctoring system under a user with the "Administrator" role.
this is the list of proctors logins (or user group logins) which is delimited by commas, and if the "@" symbol is specified, then by clicking on the proctoring item link the proctor will have access to all sessions that have been created and passed through by the participants on the same link.
Through the "members" parameter you can manage the assignment of proctors to sessions in three ways:
Moodle users with the "Teacher" role who are assigned to a course will be able to log into the proctoring system as proctors through this external tool in the course. These proctors will only be able to observe (or access session protocols) for those participants who started a proctoring session through the same external tool in the course.
Access to sessions started through this external tool in the course will be provided only to proctors with the listed logins (list of proctor logins in the proctoring system with comma as separator). Proctors can either be created through the admin panel of the proctoring system, or they can be Moodle users with the “Teacher” role. In the second case, the proctor's login will be the user ID in Moodle.
Rules for assigning proctors to sessions are configured in the session template through the admin panel of the proctoring system. In this case, you can either specify a list of proctor logins on the Participants tab, or define rules for assigning proctors to sessions from a list on the Invitations tab
PLEASE NOTE
"switch role to" → student
. Switch back to the admin account: "return to my normal role"
To prevent the participant from starting the assessment before the proctoring starts, you need to hide the assessment element from the course page, while leaving access to it. To do this, you can hide the topic:
And then make the assessment element available:
After these steps, the topic with the assessment element should look like this:
Besides, select the following to hide your Topic completely: "Course settings" → "Course format" → "Hidden sections" → "Hidden sections are completely invisible":
Immediately after the beginning of the proctoring session for the proctoring element, the score is set at 0, and after completion, it is always greater than 0 (from 0.1 to 100 with a hundred-point scale). This can be used in the conditions of access restriction of the associated course element. This setting is performed not for the proctoring element, but for an associated course element.
If you skip this setting, the test-taker will be able to find the link to the assessment in their Moodle schedule and take the assessment through the direct link without proctoring.
Now, when navigating through the proctoring element, the test-taker will begin to perform the associated assessment element according to the proctoring procedure. When you click on a proctoring element, the teacher or administrator will be taken to the proctor interface, where they will gain access to all sessions that were created when you clicked on this element. After the proctoring session in Moodle, the evaluation of the degree of confidence in the results of the assessment from 0 to 1 is sent. The proctoring results for each test-taker are returned to the Moodle gradebook (Grades section). The "API" field in the proctoring session template settings is not used when integrating with Moodle.
To allow test-takers to make several attempts to pass the quiz:
In Moodle you can select the number of attempts in quiz settings (up to the required one). To do this, go to the quiz element settings and specify the number of attempts in the field "Settings" → "Grade" → "Attempts allowed"
. Besides, you may select "Unlimited" with an unrestricted number of attempts for a test-taker to pass a quiz. The screenshot shows that the test-taker can pass the quiz only one time:
From the proctoring side, the administrator must also assign an additional number of attempts. If the number of attempts is not defined from a proctoring side, a test-taker will have 1 attempt to pass the quiz. As for the screenshot, a test-taker has 3 attempts (1 main and 2 additional):
This setting is required from Moodle and Proctoring sides. If "Unlimited" is selected in Moodle, then you should define the number of attempts from a proctoring side. If the test-taker overwhelmed the number of attempts in the proctoring, you should make changes not in a template, but in the test-taker session. All changes in a template are applied to newly created sessions. That is why you need to update individual test-taker sessions for this case.
There are three options in this scenario:
To connect the integration API with Moodle, you need to load the following config with integration parameters under the proctoring system manager:
JSON
{
"id": "<Host_ID>",
"key": "<License_Key>",
"params": {
"webhooks": {
"moodle": {
"authorizer": "lti",
"integrator": "lti",
"consumerKey": "demo",
"consumerSecret": "secret",
"callbackURL": "query.redirect",
"profile": {
"username": "payload.user_id",
"role": "payload.roles.find(v=>/Instructor/.test(v))?'proctor':'student'",
"nickname": "payload.lis_person_name_full",
"lang": "(payload.launch_presentation_locale||'').slice(0,2)",
"group": "['G',payload.context_id,payload.resource_link_id].join('-')",
"referrer": "payload.launch_presentation_return_url",
"labels": "payload.lis_person_contact_email_primary"
},
"register": {
"identifier": "[payload.user_id,payload.context_id,payload.resource_link_id].join('-').replace(/[^A-Za-z0-9_-]+/g,'_')",
"template": "payload.custom_template||'default'",
"subject": "payload.resource_link_title",
"members": "payload.custom_members==='@'?user.group:payload.custom_members",
"url": "payload.custom_url||payload.launch_presentation_return_url",
"tags": "payload.lis_person_contact_email_primary"
},
"start": true,
"stop": true,
"pause": true,
"submit": true
}
}
}
}
NOTE: the fields "consumerKey" and "consumerSecret" need to be replaced with a randomly generated sequence of characters (Latin letters of different case and numbers, the recommended length is 24 characters); "id" is the ID of the host (if you do not specify it, a new host will be created); "key" is the license key of this host.