Skip to content

feat: remove marketingEnabled flag from Schedule & Details#3088

Draft
feanil wants to merge 1 commit into
masterfrom
feanil/depr-marketing-enabled
Draft

feat: remove marketingEnabled flag from Schedule & Details#3088
feanil wants to merge 1 commit into
masterfrom
feanil/depr-marketing-enabled

Conversation

@feanil

@feanil feanil commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

The marketingEnabled field in the course settings API (GET /api/contentstore/v1/course_settings/{course_id}) was previously driven by the ENABLE_MKTG_SITE backend setting. That setting has been removed in openedx/openedx-platform#38720, and the API now always returns true.

This PR removes the marketingEnabled conditional from the Schedule & Details page and cleans up the dead code path.

Changes

  • Remove marketingEnabled from BasicSection — always renders the "Promoting your course" banner (the former true path); the false path is no longer reachable
  • Extract CoursePromotionCard — the legacy enrollment card (direct LMS about-page link + "Invite your students" mailto button) is extracted into a standalone named export from basic-section, so operators who want to restore that UX can do so via the PageBannerSlot
  • Extend PageBannerSlot — adds lmsLinkForAboutPage, courseDisplayName, and platformName as optional pluginProps so CoursePromotionCard has what it needs when used from a plugin
  • Update PageBannerSlot README — documents how to restore the enrollment card via the slot for operators migrating away from ENABLE_MKTG_SITE=False
  • Remove marketingEnabled from the API type — field dropped from CourseSettingsData in api.ts

Compatibility

This PR is safe to merge before or after the backend change lands. Extra fields returned by the API are silently ignored at runtime — removing marketingEnabled from the type does not cause any errors if the API still sends it.

The `marketingEnabled` field in the course settings API was previously driven
by the `ENABLE_MKTG_SITE` backend setting, which has been removed in
openedx/openedx-platform#38720. The API now always returns `true`.

- Remove `marketingEnabled` prop from `BasicSection`; always render the
  promotional banner (the `true` path)
- Extract the legacy enrollment card (LMS about-page link + "Invite your
  students" mailto button) into a standalone `CoursePromotionCard` component
  exported from `basic-section`, so operators can restore it via the
  `PageBannerSlot` if desired
- Extend `PageBannerSlot` to pass `lmsLinkForAboutPage`, `courseDisplayName`,
  and `platformName` as `pluginProps` so `CoursePromotionCard` has what it needs
  when used from a plugin
- Update `PageBannerSlot` README with instructions for restoring the enrollment
  card via the slot

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant