feat: remove marketingEnabled flag from Schedule & Details#3088
Draft
feanil wants to merge 1 commit into
Draft
Conversation
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>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
marketingEnabledfield in the course settings API (GET /api/contentstore/v1/course_settings/{course_id}) was previously driven by theENABLE_MKTG_SITEbackend setting. That setting has been removed in openedx/openedx-platform#38720, and the API now always returnstrue.This PR removes the
marketingEnabledconditional from the Schedule & Details page and cleans up the dead code path.Changes
marketingEnabledfromBasicSection— always renders the "Promoting your course" banner (the formertruepath); thefalsepath is no longer reachableCoursePromotionCard— the legacy enrollment card (direct LMS about-page link + "Invite your students" mailto button) is extracted into a standalone named export frombasic-section, so operators who want to restore that UX can do so via thePageBannerSlotPageBannerSlot— addslmsLinkForAboutPage,courseDisplayName, andplatformNameas optionalpluginPropssoCoursePromotionCardhas what it needs when used from a pluginPageBannerSlotREADME — documents how to restore the enrollment card via the slot for operators migrating away fromENABLE_MKTG_SITE=FalsemarketingEnabledfrom the API type — field dropped fromCourseSettingsDatainapi.tsCompatibility
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
marketingEnabledfrom the type does not cause any errors if the API still sends it.