Skip to content

feat: removing enterprise code and adding DashboardContextEnricher#270

Open
kiram15 wants to merge 1 commit intorelease-ulmofrom
kiram15/ENT-11569
Open

feat: removing enterprise code and adding DashboardContextEnricher#270
kiram15 wants to merge 1 commit intorelease-ulmofrom
kiram15/ENT-11569

Conversation

@kiram15
Copy link
Copy Markdown

@kiram15 kiram15 commented May 6, 2026

Description

  • All enterprise_support imports are removed from dashboard.py and management.py.
  • In dashboard.py, the three enterprise context assignments (enterprise_message, is_enterprise_user, enterprise learner portal context) are removed from the context dict before the DashboardRenderStarted.run_filter() call; the filter pipeline step in edx-enterprise will inject them instead.
  • In management.py, the is_enterprise_learner check and is_enterprise_learner context key are removed.
  • No import of enterprise or enterprise_support remains in any changed file.

Supporting information

ENT-11569

Testing instructions

Please provide detailed step-by-step instructions for testing this change.

Deadline

"None" if there's no rush, or provide a specific date or event (and reason) if there is one.

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
  • If your database migration can't be rolled back easily.

Copilot AI review requested due to automatic review settings May 6, 2026 21:32
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Thank you for your pull request! Congratulations on completing the Open edX tutorial! A team member will be by to take a look shortly.
To those watching community pull requests: No need to worry about this one, a tCRIL team member will be taking care of it.
For this PR's author: If this is a PR that is NOT coming from the Open edX tutorial, please comment and let us know to disregard this message.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes Enterprise-specific context construction from the LMS learner dashboard and account activation email flow, shifting Enterprise dashboard context injection to an Open edX Filters pipeline step (DashboardContextEnricher) and removing the legacy dashboard consent-link UI.

Changes:

  • Remove enterprise_support/Enterprise context wiring from student_dashboard and compose_activation_email/activate_account.
  • Remove the legacy “consent required courses” helper (get_consent_required_courses) and associated tests/UI templates.
  • Add an OPEN_EDX_FILTERS_CONFIG default configuration enabling the dashboard render filter pipeline step.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
openedx/features/enterprise_support/tests/test_api.py Removes tests for the deleted get_consent_required_courses helper.
openedx/features/enterprise_support/api.py Removes the get_consent_required_courses API helper.
openedx/core/djangoapps/user_authn/tests/test_tasks.py Updates activation email context expectations after removing enterprise context key.
lms/templates/dashboard/_dashboard_show_consent.html Deletes the legacy consent CTA message template.
lms/templates/dashboard/_dashboard_course_listing.html Removes inclusion/args for the deleted consent CTA block.
lms/templates/dashboard.html Removes per-course consent-link wiring from dashboard rendering.
lms/envs/common.py Introduces OPEN_EDX_FILTERS_CONFIG to run the enterprise dashboard context enricher step.
common/djangoapps/student/views/management.py Removes enterprise learner context and redirect special-casing.
common/djangoapps/student/views/dashboard.py Removes enterprise context creation prior to DashboardRenderStarted.run_filter().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lms/envs/common.py Outdated
Comment thread lms/envs/common.py
@kiram15 kiram15 force-pushed the kiram15/ENT-11569 branch from 75d63dd to a6255ad Compare May 6, 2026 22:30
@pwnage101
Copy link
Copy Markdown
Member

❌ I see that many of the issues raised (and fixed) in the sibling PR are still present here. One practical reason to keep your PRs one single commit (especially these platform ones) is so that it simplifies cherry-picking between them. Trying to keep these two PRs synchronized is burdened by the overhead of merge commits and fixup commits which pollute the history.

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.

3 participants