@@ -6,24 +6,25 @@ import {
66 sendTrackEvent ,
77 sendTrackingLogEvent ,
88} from '@edx/frontend-platform/analytics' ;
9+ import { getConfig } from '@edx/frontend-platform' ;
910import { useIntl } from '@edx/frontend-platform/i18n' ;
1011import { useSelector } from 'react-redux' ;
1112import SequenceExamWrapper from '@edx/frontend-lib-special-exams' ;
1213
1314import PageLoading from '@src/generic/PageLoading' ;
1415import { useModel } from '@src/generic/model-store' ;
1516import { useSequenceBannerTextAlert , useSequenceEntranceExamAlert } from '@src/alerts/sequence-alerts/hooks' ;
16- import SequenceContainerSlot from '../../../plugin-slots/SequenceContainerSlot' ;
17+ import { NotificationsDiscussionsSidebarSlot } from '@src/plugin-slots/NotificationsDiscussionsSidebarSlot' ;
18+ import { CourseOutlineSidebarSlot } from '@src/plugin-slots/CourseOutlineSidebarSlot' ;
19+ import { CourseOutlineSidebarTriggerSlot } from '@src/plugin-slots/CourseOutlineSidebarTriggerSlot' ;
20+ import SequenceContainerSlot from '@src/plugin-slots/SequenceContainerSlot' ;
21+ import SequenceNavigationSlot from '@src/plugin-slots/SequenceNavigationSlot' ;
1722
18- import { getCoursewareOutlineSidebarSettings } from '../../data/selectors' ;
1923import CourseLicense from '../course-license' ;
20- import { NotificationsDiscussionsSidebarSlot } from '../../../plugin-slots/NotificationsDiscussionsSidebarSlot' ;
2124import messages from './messages' ;
2225import HiddenAfterDue from './hidden-after-due' ;
23- import { SequenceNavigation , UnitNavigation } from './sequence-navigation' ;
26+ import { UnitNavigation } from './sequence-navigation' ;
2427import SequenceContent from './SequenceContent' ;
25- import { CourseOutlineSidebarSlot } from '../../../plugin-slots/CourseOutlineSidebarSlot' ;
26- import { CourseOutlineSidebarTriggerSlot } from '../../../plugin-slots/CourseOutlineSidebarTriggerSlot' ;
2728
2829const Sequence = ( {
2930 unitId,
@@ -47,7 +48,6 @@ const Sequence = ({
4748 const unit = useModel ( 'units' , unitId ) ;
4849 const sequenceStatus = useSelector ( state => state . courseware . sequenceStatus ) ;
4950 const sequenceMightBeUnit = useSelector ( state => state . courseware . sequenceMightBeUnit ) ;
50- const { enableNavigationSidebar : isEnabledOutlineSidebar } = useSelector ( getCoursewareOutlineSidebarSettings ) ;
5151 const handleNext = ( ) => {
5252 const nextIndex = sequence . unitIds . indexOf ( unitId ) + 1 ;
5353 const newUnitId = sequence . unitIds [ nextIndex ] ;
@@ -170,29 +170,23 @@ const Sequence = ({
170170 />
171171 < CourseOutlineSidebarSlot />
172172 < div className = "sequence w-100" >
173- { ! isEnabledOutlineSidebar && (
174- < div className = "sequence-navigation-container" >
175- < SequenceNavigation
176- sequenceId = { sequenceId }
177- unitId = { unitId }
178- nextHandler = { ( ) => {
179- logEvent ( 'edx.ui.lms.sequence.next_selected' , 'top' ) ;
180- handleNext ( ) ;
181- } }
182- onNavigate = { ( destinationUnitId ) => {
183- logEvent ( 'edx.ui.lms.sequence.tab_selected' , 'top' , destinationUnitId ) ;
184- handleNavigate ( destinationUnitId ) ;
185- } }
186- previousHandler = { ( ) => {
187- logEvent ( 'edx.ui.lms.sequence.previous_selected' , 'top' ) ;
188- handlePrevious ( ) ;
189- } }
190- { ...{
191- nextSequenceHandler,
192- handleNavigate,
193- } }
194- />
195- </ div >
173+ { ! getConfig ( ) . ENABLE_SEQUENCE_NAVIGATION && (
174+ < SequenceNavigationSlot
175+ sequenceId = { sequenceId }
176+ unitId = { unitId }
177+ nextHandler = { ( ) => {
178+ logEvent ( 'edx.ui.lms.sequence.next_selected' , 'top' ) ;
179+ handleNext ( ) ;
180+ } }
181+ onNavigate = { ( destinationUnitId ) => {
182+ logEvent ( 'edx.ui.lms.sequence.tab_selected' , 'top' , destinationUnitId ) ;
183+ handleNavigate ( destinationUnitId ) ;
184+ } }
185+ previousHandler = { ( ) => {
186+ logEvent ( 'edx.ui.lms.sequence.previous_selected' , 'top' ) ;
187+ handlePrevious ( ) ;
188+ } }
189+ />
196190 ) }
197191
198192 < div className = "unit-container flex-grow-1 pt-4" >
@@ -203,7 +197,6 @@ const Sequence = ({
203197 unitId = { unitId }
204198 unitLoadedHandler = { handleUnitLoaded }
205199 isOriginalUserStaff = { originalUserIsStaff }
206- isEnabledOutlineSidebar = { isEnabledOutlineSidebar }
207200 renderUnitNavigation = { renderUnitNavigation }
208201 />
209202 { unitHasLoaded && renderUnitNavigation ( false ) }
0 commit comments