When a learner tries to load the B2C course page for a course that starts in the future (error_code="course_not_started"), normally the learning MFE automatically redirects to the B2C dashboard. This change supports an alternate error_code "course_not_started_enterprise_learner" to trigger an alternative redirect to the B2B (enterprise) learner dashboard. This does two main things: 1. When the course metadata API response indicates course_access.error_code = "course_not_started_enterprise_learner" then redirect to "/redirect/enterprise-learner-dashboard". 2. When the top-level router matches path "/redirect/enterprise-learner-dashboard" then redirec to to the value of config `ENTERPRISE_LEARNER_PORTAL_URL`. ENT-8078
5 lines
149 B
JavaScript
5 lines
149 B
JavaScript
// Force all tests to run in UTC to prevent tests from being sensitive to host timezone.
|
|
module.exports = async () => {
|
|
process.env.TZ = 'UTC';
|
|
};
|