diff --git a/src/course-home/progress-tab/grades/detailed-grades/DetailedGrades.jsx b/src/course-home/progress-tab/grades/detailed-grades/DetailedGrades.jsx index 8a7f45508d..62c0e1d5da 100644 --- a/src/course-home/progress-tab/grades/detailed-grades/DetailedGrades.jsx +++ b/src/course-home/progress-tab/grades/detailed-grades/DetailedGrades.jsx @@ -19,6 +19,7 @@ function DetailedGrades({ intl }) { } = useSelector(state => state.courseHome); const { org, + tabs, } = useModel('courseHomeMeta', courseId); const { gradesFeatureIsFullyLocked, @@ -36,11 +37,14 @@ function DetailedGrades({ intl }) { }); }; - const outlineLink = ( + const overviewTab = tabs.find(tab => tab.slug === 'outline'); + const overviewTabUrl = overviewTab && overviewTab.url; + + const outlineLink = overviewTabUrl && ( @@ -63,14 +67,16 @@ function DetailedGrades({ intl }) { {!hasSectionScores && (

{intl.formatMessage(messages.detailedGradesEmpty)}

)} -

- -

+ {overviewTabUrl && ( +

+ +

+ )} ); } diff --git a/src/course-home/progress-tab/related-links/RelatedLinks.jsx b/src/course-home/progress-tab/related-links/RelatedLinks.jsx index ac514d0d6b..2392e9e138 100644 --- a/src/course-home/progress-tab/related-links/RelatedLinks.jsx +++ b/src/course-home/progress-tab/related-links/RelatedLinks.jsx @@ -15,6 +15,7 @@ function RelatedLinks({ intl }) { } = useSelector(state => state.courseHome); const { org, + tabs, } = useModel('courseHomeMeta', courseId); const { administrator } = getAuthenticatedUser(); @@ -27,22 +28,31 @@ function RelatedLinks({ intl }) { }); }; + const overviewTab = tabs.find(tab => tab.slug === 'outline'); + const overviewTabUrl = overviewTab && overviewTab.url; + const datesTab = tabs.find(tab => tab.slug === 'dates'); + const datesTabUrl = datesTab && datesTab.url; + return (

{intl.formatMessage(messages.relatedLinks)}

);