Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@edx/edx-proctoring

Package Overview
Dependencies
Maintainers
11
Versions
232
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@edx/edx-proctoring - npm Package Compare versions

Comparing version 1.5.0-rc.3 to 1.5.0-rc.4

91

edx_proctoring/static/proctoring/js/exam_action_handler.js

@@ -27,2 +27,28 @@ var edx = edx || {};

/**
* Launch modals, handling a11y focus behavior
*
* Note: don't try to leverage this for the heartbeat; the DOM
* structure this depends on doesn't live everywhere that handler
* needs to live
*/
function accessibleError(title, message) {
accessible_modal(
"#accessible-error-modal #confirm_open_button",
"#accessible-error-modal .close-modal",
"#accessible-error-modal",
".content-wrapper"
);
$("#accessible-error-modal #confirm_open_button").click();
$("#accessible-error-modal .message-title").html(message);
$('#accessible-error-modal #acessible-error-title').html(title);
$("#accessible-error-modal .ok-button")
.html(gettext("OK"))
.off('click.closeModal')
.on('click.closeModal', function(){
$("#accessible-error-modal .close-modal").click();
});
};
function workerPromiseForEventNames(eventNames) {

@@ -70,3 +96,20 @@ return function() {

function setActionButtonLoadingState($button) {
$button.prop('disabled', true);
$button.html($button.data('loading-text'));
}
function setActionButtonSteadyState($button) {
$button.prop('disabled', false);
$button.html($button.data('cta-text'));
}
function errorHandlerGivenMessage($button, title, message) {
setActionButtonSteadyState($button);
return function() {
accessibleError(title, message);
};
}
edx.courseware = edx.courseware || {};

@@ -82,2 +125,4 @@ edx.courseware.proctored_exam = edx.courseware.proctored_exam || {};

setActionButtonLoadingState($this);
var shouldUseWorker = window.Worker && edx.courseware.proctored_exam.configuredWorkerURL;

@@ -87,6 +132,23 @@ if(shouldUseWorker) {

.then(updateExamAttemptStatusPromise(actionUrl, action))
.then(reloadPage);
.then(reloadPage)
.catch(errorHandlerGivenMessage(
$this,
gettext('Error Starting Exam'),
gettext(
'Something has gone wrong starting your exam. ' +
'Please double-check that the application is running.'
),
));
} else {
updateExamAttemptStatusPromise(actionUrl, action)()
.then(reloadPage);
.then(reloadPage)
.catch(errorHandlerGivenMessage(
$this,
gettext('Error Starting Exam'),
gettext(
'Something has gone wrong starting your exam. ' +
'Please reload the page and start again.'
),
));
}

@@ -102,2 +164,4 @@ };

setActionButtonLoadingState($this);
var shouldUseWorker = window.Worker &&

@@ -110,6 +174,22 @@ edx.courseware.proctored_exam.configuredWorkerURL &&

.then(workerPromiseForEventNames(actionToMessageTypesMap[action]))
.then(reloadPage);
.then(reloadPage)
.catch(errorHandlerGivenMessage(
$this,
gettext('Error Ending Exam'),
gettext(
'Something has gone wrong ending your exam. ' +
'Please double-check that the application is running.'
)
));
} else {
updateExamAttemptStatusPromise(actionUrl, action)()
.then(reloadPage);
.then(reloadPage)
.catch(errorHandlerGivenMessage(
$this,
gettext('Error Ending Exam'),
gettext(
'Something has gone wrong ending your exam. ' +
'Please reload the page and start again.'
)
));
}

@@ -123,4 +203,3 @@ }

}
edx.courseware.proctored_exam.accessibleError = accessibleError;
}).call(this, $);

2

package.json

@@ -5,3 +5,3 @@ {

"//": "Note that the version format is slightly different than that of the Python version when using prereleases.",
"version": "1.5.0-rc.3",
"version": "1.5.0-rc.4",
"main": "edx_proctoring/static/index.js",

@@ -8,0 +8,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc