diff --git a/src/course-outline/CourseOutline.jsx b/src/course-outline/CourseOutline.jsx index 073a96bf39..25c6564bce 100644 --- a/src/course-outline/CourseOutline.jsx +++ b/src/course-outline/CourseOutline.jsx @@ -55,6 +55,7 @@ const CourseOutline = ({ courseId }) => { statusBarData, courseActions, sectionsList, + isCustomRelativeDatesActive, isLoading, isReIndexShow, showErrorAlert, @@ -311,6 +312,8 @@ const CourseOutline = ({ courseId }) => { section={section} index={sectionIndex} canMoveItem={canMoveItem(sections)} + isSelfPaced={statusBarData.isSelfPaced} + isCustomRelativeDatesActive={isCustomRelativeDatesActive} savingStatus={savingStatus} onOpenHighlightsModal={handleOpenHighlightsModal} onOpenPublishModal={openPublishModal} @@ -334,6 +337,8 @@ const CourseOutline = ({ courseId }) => { subsection={subsection} index={subsectionIndex} canMoveItem={canMoveItem(section.childInfo.children)} + isSelfPaced={statusBarData.isSelfPaced} + isCustomRelativeDatesActive={isCustomRelativeDatesActive} savingStatus={savingStatus} onOpenPublishModal={openPublishModal} onOpenDeleteModal={openDeleteModal} @@ -358,6 +363,8 @@ const CourseOutline = ({ courseId }) => { unit={unit} subsection={subsection} section={section} + isSelfPaced={statusBarData.isSelfPaced} + isCustomRelativeDatesActive={isCustomRelativeDatesActive} index={unitIndex} canMoveItem={canMoveItem(subsection.childInfo.children)} savingStatus={savingStatus} diff --git a/src/course-outline/CourseOutline.scss b/src/course-outline/CourseOutline.scss index 3c6572dcfd..e9ac37e25b 100644 --- a/src/course-outline/CourseOutline.scss +++ b/src/course-outline/CourseOutline.scss @@ -9,3 +9,4 @@ @import "./publish-modal/PublishModal"; @import "./configure-modal/ConfigureModal"; @import "./drag-helper/ConditionalSortableElement"; +@import "./xblock-status/XBlockStatus"; diff --git a/src/course-outline/card-header/CardHeader.scss b/src/course-outline/card-header/CardHeader.scss index a6ba83687a..a3ea06d8f1 100644 --- a/src/course-outline/card-header/CardHeader.scss +++ b/src/course-outline/card-header/CardHeader.scss @@ -1,7 +1,6 @@ .item-card-header { display: flex; align-items: center; - margin-right: -.5rem; .item-card-header__title-btn { justify-content: flex-start; diff --git a/src/course-outline/card-header/messages.js b/src/course-outline/card-header/messages.js index b268c430b7..78ce088642 100644 --- a/src/course-outline/card-header/messages.js +++ b/src/course-outline/card-header/messages.js @@ -9,6 +9,10 @@ const messages = defineMessages({ id: 'course-authoring.course-outline.card.status-badge.live', defaultMessage: 'Live', }, + statusBadgeGated: { + id: 'course-authoring.course-outline.card.status-badge.gated', + defaultMessage: 'Gated', + }, statusBadgePublishedNotLive: { id: 'course-authoring.course-outline.card.status-badge.published-not-live', defaultMessage: 'Published not live', diff --git a/src/course-outline/constants.js b/src/course-outline/constants.js index e147527262..2ce86bb602 100644 --- a/src/course-outline/constants.js +++ b/src/course-outline/constants.js @@ -1,5 +1,6 @@ export const ITEM_BADGE_STATUS = /** @type {const} */ ({ live: 'live', + gated: 'gated', publishedNotLive: 'published_not_live', unpublishedChanges: 'unpublished_changes', staffOnly: 'staff_only', diff --git a/src/course-outline/data/selectors.js b/src/course-outline/data/selectors.js index ebfb71a91b..3a3a2bb6c7 100644 --- a/src/course-outline/data/selectors.js +++ b/src/course-outline/data/selectors.js @@ -7,3 +7,4 @@ export const getCurrentItem = (state) => state.courseOutline.currentItem; export const getCurrentSection = (state) => state.courseOutline.currentSection; export const getCurrentSubsection = (state) => state.courseOutline.currentSubsection; export const getCourseActions = (state) => state.courseOutline.actions; +export const getCustomRelativeDatesActiveFlag = (state) => state.courseOutline.isCustomRelativeDatesActive; diff --git a/src/course-outline/data/slice.js b/src/course-outline/data/slice.js index 33f7344f02..fd2706f656 100644 --- a/src/course-outline/data/slice.js +++ b/src/course-outline/data/slice.js @@ -28,6 +28,7 @@ const slice = createSlice({ videoSharingOptions: VIDEO_SHARING_OPTIONS.perVideo, }, sectionsList: [], + isCustomRelativeDatesActive: false, currentSection: {}, currentSubsection: {}, currentItem: {}, @@ -42,6 +43,7 @@ const slice = createSlice({ fetchOutlineIndexSuccess: (state, { payload }) => { state.outlineIndexData = payload; state.sectionsList = payload.courseStructure?.childInfo?.children || []; + state.isCustomRelativeDatesActive = payload.isCustomRelativeDatesActive; }, updateOutlineIndexLoadingStatus: (state, { payload }) => { state.loadingStatus = { diff --git a/src/course-outline/drag-helper/ConditionalSortableElement.jsx b/src/course-outline/drag-helper/ConditionalSortableElement.jsx index 10088a4667..8390b282cd 100644 --- a/src/course-outline/drag-helper/ConditionalSortableElement.jsx +++ b/src/course-outline/drag-helper/ConditionalSortableElement.jsx @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Row } from '@edx/paragon'; +import { Col, Row } from '@edx/paragon'; import { SortableItem } from '@edx/frontend-lib-content-components'; const ConditionalSortableElement = ({ @@ -24,9 +24,9 @@ const ConditionalSortableElement = ({ id={id} componentStyle={style} > -
{explanatoryMessage}
} -