Files
edx-platform/lms/static/js/ajax-error.js
Clinton Blackburn 69eeca61d8 Opening courseware to anonymous users
Anonymous users may now view units in the courseware. This access is limited to units that are not considered problems/graded (e.g. homework, exams).
2017-11-06 16:42:06 -05:00

16 lines
548 B
JavaScript

$(document).ajaxError(function(event, jXHR) {
if (jXHR.status === 403) {
var message = gettext(
'You have been logged out of your edX account. ' +
'Click Okay to log in again now. ' +
'Click Cancel to stay on this page ' +
'(you must log in again to save your work).'
);
if (window.confirm(message)) {
var currentLocation = window.location.pathname;
window.location.href = '/login?next=' + encodeURIComponent(currentLocation);
}
}
});