From 5a884674f071ec527fbfce90e427516b6c2d9fd1 Mon Sep 17 00:00:00 2001 From: Zachary Hancock Date: Wed, 1 Mar 2023 12:03:52 -0500 Subject: [PATCH] feat: include attempt id in all JS worker messages (#1106) --- CHANGELOG.rst | 5 +++++ edx_proctoring/__init__.py | 2 +- edx_proctoring/static/index.js | 4 ++-- package.json | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9e438b15bf..d121a2358e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,8 +13,13 @@ Change Log Unreleased ~~~~~~~~~~ + + +[4.14.0] - 2023-02-28 +~~~~~~~~~~~~~~~~~~~~~ * Changed the recommended install location for frontend-lib-special-exams to avoid potential npm problems. +* Attempt external id is now included in all JS worker messages [4.13.3] - 2022-12-2 ~~~~~~~~~~~~~~~~~~~~~ diff --git a/edx_proctoring/__init__.py b/edx_proctoring/__init__.py index 6b22ea53cc..bdc4aad92c 100644 --- a/edx_proctoring/__init__.py +++ b/edx_proctoring/__init__.py @@ -3,6 +3,6 @@ """ # Be sure to update the version number in edx_proctoring/package.json -__version__ = '4.13.3' +__version__ = '4.14.0' default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name diff --git a/edx_proctoring/static/index.js b/edx_proctoring/static/index.js index 3f8f2a0ffb..6d6a18c176 100644 --- a/edx_proctoring/static/index.js +++ b/edx_proctoring/static/index.js @@ -18,7 +18,7 @@ export const handlerWrapper = (Handler) => { } case 'endExamAttempt': { if (handler.onEndExamAttempt) { - handler.onEndExamAttempt() + handler.onEndExamAttempt(message.data.attemptExternalId) .then(() => self.postMessage({ type: 'examAttemptEnded' })) .catch(error => self.postMessage({ type: 'examAttemptEndFailed', error })); } @@ -26,7 +26,7 @@ export const handlerWrapper = (Handler) => { } case 'ping': { if (handler.onPing) { - handler.onPing(message.data.timeout) + handler.onPing(message.data.timeout, message.data.attemptExternalId) .then(() => self.postMessage({ type: 'echo' })) .catch(error => self.postMessage({ type: 'pingFailed', error })); } diff --git a/package.json b/package.json index 1faf6acd83..536095ef74 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@edx/edx-proctoring", "//": "Note that the version format is slightly different than that of the Python version when using prereleases.", - "version": "4.13.3", + "version": "4.14.0", "main": "edx_proctoring/static/index.js", "scripts": { "test": "gulp test"