Index: openacs-4/packages/proctoring-support/proctoring-support.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/proctoring-support.info,v diff -u -r1.1.2.35 -r1.1.2.36 --- openacs-4/packages/proctoring-support/proctoring-support.info 8 Mar 2022 13:01:00 -0000 1.1.2.35 +++ openacs-4/packages/proctoring-support/proctoring-support.info 24 May 2023 14:06:20 -0000 1.1.2.36 @@ -10,7 +10,7 @@ f proctoring - + Antonio Pisano Set of tools to implement proctoring of user interaction Wirtschaftsuniversität Wien @@ -21,7 +21,7 @@ No real UI is provided by the package itself. Other packages must integrate the provided includes. 0 - + Index: openacs-4/packages/proctoring-support/catalog/proctoring-support.de_DE.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/catalog/proctoring-support.de_DE.ISO-8859-1.xml,v diff -u -r1.1.2.23 -r1.1.2.24 --- openacs-4/packages/proctoring-support/catalog/proctoring-support.de_DE.ISO-8859-1.xml 8 Mar 2022 13:01:00 -0000 1.1.2.23 +++ openacs-4/packages/proctoring-support/catalog/proctoring-support.de_DE.ISO-8859-1.xml 24 May 2023 14:06:20 -0000 1.1.2.24 @@ -137,6 +137,7 @@ Anfangsdatum Matrikelnummer Filter + Es ist zu viel Zeit verstrichen, ohne dass Proctoring-Artefakte gesendet wurden. Diese Sitzung wird abgebrochen. Bitte �berpr�fen Sie Ihre Netzwerkverbindung und Hardwarekonfiguration und versuchen Sie es erneut. Alle Artefakte f�r diesen Benutzer w�rden als in Ordnung best�tigt, sind Sie sicher? Alle in Ordnung In Ordnung Index: openacs-4/packages/proctoring-support/catalog/proctoring-support.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/catalog/proctoring-support.en_US.ISO-8859-1.xml,v diff -u -r1.1.2.25 -r1.1.2.26 --- openacs-4/packages/proctoring-support/catalog/proctoring-support.en_US.ISO-8859-1.xml 2 Mar 2022 17:43:32 -0000 1.1.2.25 +++ openacs-4/packages/proctoring-support/catalog/proctoring-support.en_US.ISO-8859-1.xml 24 May 2023 14:06:20 -0000 1.1.2.26 @@ -142,6 +142,7 @@ Start date Student ID Time filter presets + Too much time has passed without sending proctoring artifacts. This session will be aborted. Please check your network connectivity and hardware configuration and try again. This will set all artifacts for this user as OK, are you sure? Set everything as OK Confirm OK Index: openacs-4/packages/proctoring-support/catalog/proctoring-support.it_IT.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/catalog/proctoring-support.it_IT.ISO-8859-1.xml,v diff -u -r1.1.2.8 -r1.1.2.9 --- openacs-4/packages/proctoring-support/catalog/proctoring-support.it_IT.ISO-8859-1.xml 2 Mar 2022 17:43:32 -0000 1.1.2.8 +++ openacs-4/packages/proctoring-support/catalog/proctoring-support.it_IT.ISO-8859-1.xml 24 May 2023 14:06:20 -0000 1.1.2.9 @@ -63,6 +63,7 @@ Data inizio ID Studente Periodi preselezionati + � trascorso troppo tempo senza che siano stati inviati artefatti di verifica. La sessione verr� interrotta. Si prega di controllare la connettivit� di rete e la configurazione hardware e riprovare. Tutti gli artefatti di questo utente saranno segnati come OK. Vuoi procedere? Segna tutto come OK Segna come OK Index: openacs-4/packages/proctoring-support/lib/proctored-page.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/lib/proctored-page.adp,v diff -u -r1.1.2.15 -r1.1.2.16 --- openacs-4/packages/proctoring-support/lib/proctored-page.adp 15 Dec 2022 13:47:29 -0000 1.1.2.15 +++ openacs-4/packages/proctoring-support/lib/proctored-page.adp 24 May 2023 14:06:20 -0000 1.1.2.16 @@ -137,5 +137,6 @@ const submitLabel = "#proctoring-support.wizard_finish#"; const acceptLabel = "#proctoring-support.accept#"; const blackPictureSizeThreshold = 5000; // kbytes + const tooLongWithoutSendingArtifactsMessage = `@msg.too_long_without_sending_artifacts@`; Index: openacs-4/packages/proctoring-support/lib/proctored-page.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/lib/proctored-page.tcl,v diff -u -r1.1.2.13 -r1.1.2.14 --- openacs-4/packages/proctoring-support/lib/proctored-page.tcl 12 Jul 2022 14:46:35 -0000 1.1.2.13 +++ openacs-4/packages/proctoring-support/lib/proctored-page.tcl 24 May 2023 14:06:20 -0000 1.1.2.14 @@ -119,6 +119,7 @@ set default_msg(wrong_display_surface_selected) [_ proctoring-support.wrong_display_surface_selected] set default_msg(display_surface_not_supported) [_ proctoring-support.display_surface_not_supported] set default_msg(mobile_devices_not_supported) [_ proctoring-support.mobile_devices_are_unsupported] +set default_msg(too_long_without_sending_artifacts) [_ proctoring-support.too_long_without_sending_artifacts] foreach {key value} [array get default_msg] { if {![info exists msg($key)]} { Index: openacs-4/packages/proctoring-support/www/resources/proctored-page.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/www/resources/proctored-page.js,v diff -u -r1.1.2.30 -r1.1.2.31 --- openacs-4/packages/proctoring-support/www/resources/proctored-page.js 15 Dec 2022 13:41:22 -0000 1.1.2.30 +++ openacs-4/packages/proctoring-support/www/resources/proctored-page.js 24 May 2023 14:06:20 -0000 1.1.2.31 @@ -1,10 +1,15 @@ function modalAlert(message, handler) { - document.querySelector('#modal-messages .modal-body').innerHTML = message; - const dialog = $('#modal-messages'); - if (typeof handler === 'function') { - dialog.on('hidden.bs.modal', handler); + if (typeof jQuery !== 'undefined') { + document.querySelector('#modal-messages .modal-body').innerHTML = message; + const dialog = $('#modal-messages'); + if (typeof handler === 'function') { + dialog.on('hidden.bs.modal', handler); + } + dialog.modal('show'); + } else { + alert(message); + handler(); } - dialog.modal('show'); } function streamMuted(stream) { @@ -105,6 +110,39 @@ uploadQueue.push(formData); } + +// +// In this proctoring implementation we try to tolerate many +// suboptimal conditions such as lack of Internet connectivity or a +// temporary downtime of the server. We also handle exceptions +// happening at various places on the client side, such as obtaining +// the picture, making sure streams are active and so on. +// +// In the wild we have encountered situations where despite our best +// efforts the user would be able to proceed through the session +// without generating proctoring artifacts. Foul play aside, such +// condition may happen, for instance, if the client suddenly hangs +// while taking a picture without generating an error. This may be due +// to various factors such as hardware errors or browser bugs that is +// difficult to foresee or reproduce. In such unfortunate case, no +// upload would be scheduled and no error would be thrown. +// +// Therefore, we now implement a simple "ground-truth" test: whenever +// we detect that the client has not been sending artifacts for longer +// than 10 times the maximum proctoring interval, we inform the user +// and abort the session. +// +let latestSuccessfulUploadTimeout; +function checkUpload() { + clearTimeout(latestSuccessfulUploadTimeout); + + latestSuccessfulUploadTimeout = setTimeout(function () { + modalAlert(tooLongWithoutSendingArtifactsMessage, function() { + location.reload(); + }); + }, maxMsInterval * 10); +} + function upload() { if (!hasUpload) { uploadQueue.length = 0; @@ -140,6 +178,7 @@ // Success: reschedule the upload 1s from now. // reschedule(1000); + checkUpload(); } else { // // Proctoring is over: redirect to the unproctored @@ -537,6 +576,7 @@ proctoring.start(); console.log('starting upload'); upload(); + checkUpload(); console.log('proctoring has started'); } else { createIframe();