diff --git a/src/data/messages/handlers.js b/src/data/messages/handlers.js index ed37e744..21f4969d 100644 --- a/src/data/messages/handlers.js +++ b/src/data/messages/handlers.js @@ -16,7 +16,7 @@ function workerTimeoutPromise(timeoutMilliseconds) { } export function workerPromiseForEventNames(eventNames, workerUrl) { - return (timeout) => { + return (timeout, attemptExternalId) => { const proctoringBackendWorker = createWorker(workerUrl); return new Promise((resolve, reject) => { const responseHandler = (e) => { @@ -29,7 +29,7 @@ export function workerPromiseForEventNames(eventNames, workerUrl) { } }; proctoringBackendWorker.addEventListener('message', responseHandler); - proctoringBackendWorker.postMessage({ type: eventNames.promptEventName, timeout }); + proctoringBackendWorker.postMessage({ type: eventNames.promptEventName, timeout, attemptExternalId }); }); }; } diff --git a/src/data/slice.js b/src/data/slice.js index e692cd31..ce7ab151 100644 --- a/src/data/slice.js +++ b/src/data/slice.js @@ -61,6 +61,7 @@ export const examSlice = createSlice({ desktop_application_js_url: '', ping_interval: null, attempt_code: '', + external_id: '', }, type: '', }, diff --git a/src/data/thunks.js b/src/data/thunks.js index 5d26f43f..1e952299 100644 --- a/src/data/thunks.js +++ b/src/data/thunks.js @@ -149,6 +149,7 @@ export function startProctoredExam() { const startExamTimeoutMilliseconds = EXAM_START_TIMEOUT_MILLISECONDS; workerPromiseForEventNames(actionToMessageTypesMap.start, exam.attempt.desktop_application_js_url)( startExamTimeoutMilliseconds, + attempt.external_id, ).then(() => updateAttemptAfter( exam.course_id, exam.content_id, continueAttempt(attempt.attempt_id), )(dispatch))