antoniop
committed
on 19 Oct 23
Don't draw a border around the proctoring iframe, to reduce UI cluttering
openacs-4/.../resources/proctored-page.js (+1 -0)
140 140 //
141 141 // Therefore, we now implement a simple "ground-truth" test: whenever
142 142 // we detect that the client has not been sending artifacts for longer
143 143 // than 10 times the maximum proctoring interval, we inform the user
144 144 // and abort the session.
145 145 //
146 146 let latestSuccessfulUploadTimeout;
147 147 function checkUpload() {
148 148     clearTimeout(latestSuccessfulUploadTimeout);
149 149
150 150     latestSuccessfulUploadTimeout = setTimeout(function () {
151 151         modalAlert(tooLongWithoutSendingArtifactsMessage, function() {
152 152             location.reload();
153 153         });
154 154     }, maxMsInterval * 10);
155 155 }
156 156
157 157 function upload() {
158 158     if (!hasUpload) {
159 159         uploadQueue.length = 0;
  160         checkUpload();
160 161         console.log('Dummy upload');
161 162     }
162 163
163 164     function reschedule(ms) {
164 165         clearTimeout(uploadHandle);
165 166         uploadHandle = setTimeout(upload, ms);
166 167         console.log('Upload rescheduled.');
167 168     }
168 169
169 170     if (uploadQueue.length > 0) {
170 171         //
171 172         // There are files in the queue. Get the first element and
172 173         // prepare to send.
173 174         //
174 175         const formData = uploadQueue.shift();
175 176
176 177         //
177 178         // Prepare the upload
178 179         //
179 180         const request = new window.XMLHttpRequest();