Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/courseware/course/Course.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import ContentTools from './content-tools';
import Sequence from './sequence';
import { CourseOutlineMobileSidebarTriggerSlot } from '../../plugin-slots/CourseOutlineMobileSidebarTriggerSlot';
import { CourseBreadcrumbsSlot } from '../../plugin-slots/CourseBreadcrumbsSlot';
import { CoursewareTopBannerSlot } from '../../plugin-slots/CoursewareTopBannerSlot';

const Course = ({
courseId,
Expand Down Expand Up @@ -108,7 +109,7 @@ const Course = ({
<NotificationsDiscussionsSidebarTriggerSlot courseId={courseId} />
</div>
</div>

<CoursewareTopBannerSlot courseId={courseId} />
<AlertList topic="sequence" />
<Sequence
unitId={unitId}
Expand Down
14 changes: 14 additions & 0 deletions src/plugin-slots/CoursewareTopBannerSlot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Courseware Top Banner Slot

### Slot ID: `org.openedx.frontend.learning.courseware_top_banner.v1`

### Slot ID Aliases
* `courseware_top_banner_slot`

### Props:
* `courseId`
* `model` (always set to `coursewareMeta`)

## Description

This slot is rendered in the courseware page shell (`Course.jsx`) above the sequence content. It is intended for top-of-courseware banners that should display in the Learning MFE chrome (not inside the LMS unit iframe).
22 changes: 22 additions & 0 deletions src/plugin-slots/CoursewareTopBannerSlot/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';

import { PluginSlot } from '@openedx/frontend-plugin-framework';

interface CoursewareTopBannerSlotProps {
courseId: string;
}

export const CoursewareTopBannerSlot = ({
courseId,
}: CoursewareTopBannerSlotProps) => (
<PluginSlot
id="org.openedx.frontend.learning.courseware_top_banner.v1"
idAliases={['courseware_top_banner_slot']}
pluginProps={{
courseId,
model: 'coursewareMeta',
}}
/>
);

export default CoursewareTopBannerSlot;
1 change: 1 addition & 0 deletions src/plugin-slots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* [`org.openedx.frontend.learning.course_outline_sidebar_trigger.v1`](./CourseOutlineSidebarTriggerSlot)
* [`org.openedx.frontend.learning.course_outline_sidebar.v1`](./CourseOutlineSidebarSlot/)
* [`org.openedx.frontend.learning.course_outline_tab_notifications.v1`](./CourseOutlineTabNotificationsSlot/)
* [`org.openedx.frontend.learning.courseware_top_banner.v1`](./CoursewareTopBannerSlot/)
* [`org.openedx.frontend.learning.course_recommendations.v1`](./CourseRecommendationsSlot/)
* [`org.openedx.frontend.learning.gated_unit_content_message.v1`](./GatedUnitContentMessageSlot/)
* [`org.openedx.frontend.learning.learner_tools.v1`](./LearnerToolsSlot/)
Expand Down
Loading