Skip to content

feat: replace enterprise_support import with GradeEventContextRequested filter#38097

Open
pwnage101 wants to merge 1 commit intomasterfrom
pwnage101/ENT-11563
Open

feat: replace enterprise_support import with GradeEventContextRequested filter#38097
pwnage101 wants to merge 1 commit intomasterfrom
pwnage101/ENT-11563

Conversation

@pwnage101
Copy link
Copy Markdown
Contributor

@pwnage101 pwnage101 commented Mar 4, 2026

Removes the direct import of get_enterprise_event_context from openedx.features.enterprise_support.context in grades/events.py and replaces it with a call to the GradeEventContextRequested openedx-filter. Adds the filter to OPEN_EDX_FILTERS_CONFIG with the GradeEventContextEnricher pipeline step. Updates tests to mock the filter instead of the enterprise function.

ENT-11563

Co-Authored-By: Claude Sonnet 4.6 [email protected]


Blocked by:

Copy link
Copy Markdown
Member

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

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

Thanks for this work! I think we can avoid adding more complexity to production.py, though, no?

Comment thread lms/envs/production.py Outdated
@kiram15 kiram15 force-pushed the pwnage101/ENT-11563 branch 3 times, most recently from fa66d0b to 2ad7aa1 Compare May 5, 2026 20:26
Comment thread lms/envs/common.py
@kiram15 kiram15 force-pushed the pwnage101/ENT-11563 branch 2 times, most recently from 18f9d8b to 22f0eb2 Compare May 5, 2026 22:00
…ed filter

Removes the direct import of get_enterprise_event_context from
openedx.features.enterprise_support.context in grades/events.py and
replaces it with a call to the GradeEventContextRequested openedx-filter.
Adds the filter to OPEN_EDX_FILTERS_CONFIG with the GradeEventContextEnricher
pipeline step. Updates tests to mock the filter instead of the enterprise function.

ENT-11563

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@kiram15 kiram15 force-pushed the pwnage101/ENT-11563 branch from 22f0eb2 to cacd853 Compare May 5, 2026 22:08
Comment thread lms/envs/common.py
Comment on lines +3296 to +3298
"org.openedx.learning.grade.context.requested.v1": {
"fail_silently": False,
"pipeline": ["enterprise.filters.dashboard.DashboardContextEnricher"],
Copy link
Copy Markdown
Contributor Author

@pwnage101 pwnage101 May 5, 2026

Choose a reason for hiding this comment

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

❌ Now the filter and the pipeline step are incompatible. I think you meant to include GradeEventContextEnricher, not DashboardContextEnricher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enterprise An enterprise-related change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants