diff --git a/src/course-home/data/__factories__/outlineTabData.factory.js b/src/course-home/data/__factories__/outlineTabData.factory.js index a523bb7f..4f332c33 100644 --- a/src/course-home/data/__factories__/outlineTabData.factory.js +++ b/src/course-home/data/__factories__/outlineTabData.factory.js @@ -22,4 +22,9 @@ Factory.define('outlineTabData') extra_text: 'Contact the administrator.', }) .attr('handouts_html', [], () => '
Welcome to this course!
'); diff --git a/src/course-home/data/__snapshots__/redux.test.js.snap b/src/course-home/data/__snapshots__/redux.test.js.snap index 48e6635b..8a26fb65 100644 --- a/src/course-home/data/__snapshots__/redux.test.js.snap +++ b/src/course-home/data/__snapshots__/redux.test.js.snap @@ -211,7 +211,11 @@ Object { "handoutsHtml": "Welcome to this course!
", }, }, }, diff --git a/src/course-home/data/api.js b/src/course-home/data/api.js index 7faffb92..f362a5df 100644 --- a/src/course-home/data/api.js +++ b/src/course-home/data/api.js @@ -75,6 +75,7 @@ export async function getOutlineTabData(courseId) { const enrollAlert = camelCaseObject(data.enroll_alert); const handoutsHtml = data.handouts_html; const offerHtml = data.offer_html; + const resumeCourse = camelCaseObject(data.resume_course); const welcomeMessageHtml = data.welcome_message_html; return { @@ -85,6 +86,7 @@ export async function getOutlineTabData(courseId) { enrollAlert, handoutsHtml, offerHtml, + resumeCourse, welcomeMessageHtml, }; } diff --git a/src/course-home/dates-banner/DatesBannerContainer.jsx b/src/course-home/dates-banner/DatesBannerContainer.jsx index ec6fcdf7..ce7c6dad 100644 --- a/src/course-home/dates-banner/DatesBannerContainer.jsx +++ b/src/course-home/dates-banner/DatesBannerContainer.jsx @@ -46,12 +46,12 @@ function DatesBannerContainer(props) { { name: 'upgradeToCompleteGradedBanner', shouldDisplay: upgradeToCompleteGraded, - clickHandler: () => window.location.replace(verifiedUpgradeLink), + clickHandler: () => global.location.replace(verifiedUpgradeLink), }, { name: 'upgradeToResetBanner', shouldDisplay: upgradeToReset, - clickHandler: () => window.location.replace(verifiedUpgradeLink), + clickHandler: () => global.location.replace(verifiedUpgradeLink), }, { name: 'resetDatesBanner', diff --git a/src/course-home/outline-tab/OutlineTab.jsx b/src/course-home/outline-tab/OutlineTab.jsx index 25a81364..d249d1a4 100644 --- a/src/course-home/outline-tab/OutlineTab.jsx +++ b/src/course-home/outline-tab/OutlineTab.jsx @@ -1,6 +1,5 @@ import React from 'react'; import { useSelector } from 'react-redux'; -import { Button } from '@edx/paragon'; import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; import { AlertList } from '../../generic/user-messages'; @@ -41,6 +40,10 @@ function OutlineTab({ intl }) { sections, }, courseExpiredHtml, + resumeCourse: { + hasVisitedCourse, + url: resumeCourseUrl, + }, offerHtml, } = useModel('outline', courseId); @@ -69,8 +72,12 @@ function OutlineTab({ intl }) { }} />