diff --git a/src/constants.js b/src/constants.js index 9e5c5cc84d..6881547134 100644 --- a/src/constants.js +++ b/src/constants.js @@ -59,6 +59,7 @@ export const COURSE_BLOCK_NAMES = ({ sequential: { id: 'sequential', name: 'Subsection' }, vertical: { id: 'vertical', name: 'Unit' }, libraryContent: { id: 'library_content', name: 'Library content' }, + splitTest: { id: 'split_test', name: 'Split Test' }, component: { id: 'component', name: 'Component' }, }); diff --git a/src/course-unit/CourseUnit.jsx b/src/course-unit/CourseUnit.jsx index 5392294cdb..0f810961a7 100644 --- a/src/course-unit/CourseUnit.jsx +++ b/src/course-unit/CourseUnit.jsx @@ -37,6 +37,7 @@ import TagsSidebarControls from '../content-tags-drawer/tags-sidebar-controls'; import { PasteNotificationAlert } from './clipboard'; import XBlockContainerIframe from './xblock-container-iframe'; import MoveModal from './move-modal'; +import SplitTestSidebarInfo from 'CourseAuthoring/course-unit/sidebar/SplitTestSidebarInfo'; const CourseUnit = ({ courseId }) => { const { blockId } = useParams(); @@ -72,6 +73,7 @@ const CourseUnit = ({ courseId }) => { const isUnitVerticalType = unitCategory === COURSE_BLOCK_NAMES.vertical.id; const isUnitLibraryType = unitCategory === COURSE_BLOCK_NAMES.libraryContent.id; + const isSplitTestType = unitCategory === COURSE_BLOCK_NAMES.splitTest.id; const unitLayout = [{ span: 12 }, { span: 0 }]; const defaultLayout = { @@ -161,7 +163,7 @@ const CourseUnit = ({ courseId }) => { )} headerActions={( )} @@ -229,6 +231,11 @@ const CourseUnit = ({ courseId }) => { )} + {isSplitTestType && ( + + + + )} diff --git a/src/course-unit/CourseUnit.scss b/src/course-unit/CourseUnit.scss index 6a7c0c72bd..fa96286310 100644 --- a/src/course-unit/CourseUnit.scss +++ b/src/course-unit/CourseUnit.scss @@ -4,6 +4,7 @@ @import "./sidebar/Sidebar"; @import "./header-title/HeaderTitle"; @import "./move-modal"; +@import "./xblock-container-iframe"; .course-unit { min-width: 900px; diff --git a/src/course-unit/breadcrumbs/Breadcrumbs.jsx b/src/course-unit/breadcrumbs/Breadcrumbs.jsx index 8d770fd23b..0bb8280ad2 100644 --- a/src/course-unit/breadcrumbs/Breadcrumbs.jsx +++ b/src/course-unit/breadcrumbs/Breadcrumbs.jsx @@ -15,41 +15,51 @@ const Breadcrumbs = ({ courseId, sequenceId }) => { const intl = useIntl(); const { ancestorXblocks = [] } = useSelector(getCourseSectionVertical); + const hasChildWithUrl = (children = []) => !!children.filter((child) => child.url).length; + return ( -