Skip to content

Commit bcea1e2

Browse files
committed
feat: status bar
1 parent a92e521 commit bcea1e2

File tree

8 files changed

+156
-235
lines changed

8 files changed

+156
-235
lines changed

src/course-outline/CourseOutline.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ const CourseOutline = ({ courseId }: CourseOutlineProps) => {
316316
) : null}
317317
</TransitionReplace>
318318
<SubHeader
319-
title={intl.formatMessage(messages.headingTitle)}
319+
title={courseName}
320320
subtitle={intl.formatMessage(messages.headingSubtitle)}
321321
headerActions={(
322322
<CourseOutlineHeaderActionsSlot

src/course-outline/data/slice.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const initialState = {
2222
savingStatus: '',
2323
statusBarData: {
2424
courseReleaseDate: '',
25+
endDate: '',
2526
highlightsEnabledForMessaging: false,
2627
isSelfPaced: false,
2728
checklist: {

src/course-outline/data/thunk.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export function fetchCourseOutlineIndexQuery(courseId: string): (dispatch: any)
7575
videoSharingEnabled,
7676
videoSharingOptions,
7777
actions,
78+
end,
7879
},
7980
} = outlineIndex;
8081
dispatch(fetchOutlineIndexSuccess(outlineIndex));
@@ -83,6 +84,7 @@ export function fetchCourseOutlineIndexQuery(courseId: string): (dispatch: any)
8384
highlightsEnabledForMessaging,
8485
videoSharingOptions,
8586
videoSharingEnabled,
87+
endDate: end,
8688
}));
8789
dispatch(updateCourseActions(actions));
8890

src/course-outline/data/types.ts

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ export interface CourseStructure {
44
highlightsEnabledForMessaging: boolean,
55
videoSharingEnabled: boolean,
66
videoSharingOptions: string,
7+
start: string,
8+
end: string,
79
actions: XBlockActions,
810
}
911

@@ -33,6 +35,21 @@ export interface CourseDetails {
3335
description?: string;
3436
}
3537

38+
export interface CourseOutlineStatusBar {
39+
courseReleaseDate: string;
40+
endDate: string;
41+
highlightsEnabledForMessaging: boolean;
42+
isSelfPaced: boolean;
43+
checklist: {
44+
totalCourseLaunchChecks: number;
45+
completedCourseLaunchChecks: number;
46+
totalCourseBestPracticesChecks: number;
47+
completedCourseBestPracticesChecks: number;
48+
};
49+
videoSharingEnabled: boolean;
50+
videoSharingOptions: string;
51+
}
52+
3653
export interface CourseOutlineState {
3754
loadingStatus: {
3855
outlineIndexLoadingStatus: string;
@@ -48,19 +65,7 @@ export interface CourseOutlineState {
4865
};
4966
outlineIndexData: object;
5067
savingStatus: string;
51-
statusBarData: {
52-
courseReleaseDate: string;
53-
highlightsEnabledForMessaging: boolean;
54-
isSelfPaced: boolean;
55-
checklist: {
56-
totalCourseLaunchChecks: number;
57-
completedCourseLaunchChecks: number;
58-
totalCourseBestPracticesChecks: number;
59-
completedCourseBestPracticesChecks: number;
60-
};
61-
videoSharingEnabled: boolean;
62-
videoSharingOptions: string;
63-
};
68+
statusBarData: CourseOutlineStatusBar;
6469
sectionsList: Array<XBlock>;
6570
isCustomRelativeDatesActive: boolean;
6671
currentSection: XBlock | {};

src/course-outline/messages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const messages = defineMessages({
77
},
88
headingSubtitle: {
99
id: 'course-authoring.course-outline.subTitle',
10-
defaultMessage: 'Content',
10+
defaultMessage: 'Course Outline',
1111
},
1212
alertSuccessTitle: {
1313
id: 'course-authoring.course-outline.reindex.alert.success.title',

src/course-outline/status-bar/StatusBar.jsx

Lines changed: 0 additions & 220 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)