enterprise.filters package#
Submodules#
enterprise.filters.accounts module#
Pipeline step for determining read-only account settings fields.
- class enterprise.filters.accounts.AccountSettingsEnterpriseReadOnlyFieldsStep(filter_type, running_pipeline, **extra_config)#
Bases:
PipelineStepAdds SSO-managed fields to the read-only account settings fields set.
This step is intended to be registered as a pipeline step for the
org.openedx.learning.account.settings.read_only_fields.requested.v1filter.When a user is linked to an enterprise customer whose SSO identity provider has
sync_learner_profile_dataenabled, the fields listed insettings.ENTERPRISE_READONLY_ACCOUNT_FIELDSare added toreadonly_fields. The"name"field is only added when the user has an existingUserSocialAuthrecord for the enterprise IdP backend.- run_filter(readonly_fields, user)#
Add enterprise SSO-managed fields to the read-only fields set.
The original code migrated from openedx-platform can be distilled into 3 logical branches:
If NO identify provider (IdP) has sync enabled → no readonly fields added.
If one or more IdPs have sync enabled, AND user has social auth → append ALL readonly fields.
If one or more IdPs have sync enabled, AND user has NO social auth → append readonly fields MINUS ‘name’.
Each return statement below is marked with the corresponding branch number.
enterprise.filters.dashboard module#
Pipeline steps for the student dashboard filter.
- class enterprise.filters.dashboard.DashboardContextEnricher(filter_type, running_pipeline, **extra_config)#
Bases:
PipelineStepEnrich the student dashboard context with enterprise-specific data.
Injects: enterprise_message, is_enterprise_user, and enterprise learner portal context keys.
enterprise.filters.grades module#
Pipeline step for enriching grade analytics event context.
- class enterprise.filters.grades.GradeEventContextEnricher(filter_type, running_pipeline, **extra_config)#
Bases:
PipelineStepEnriches a grade analytics event context dict with the learner’s enterprise UUID.
This step is intended to be registered as a pipeline step for the
org.openedx.learning.grade.context.requested.v1filter.If the user is enrolled in the given course through an enterprise, the enterprise UUID is added to the context under the key
"enterprise_uuid". If the user has no enterprise course enrollment, the context is returned unchanged.- run_filter(context: dict, user_id: int, course_id: str) dict[str, Any]#
Add enterprise UUID to the event context if the user has an enterprise enrollment.
- Parameters:
- Returns:
updated pipeline data with the enriched
contextdict:{ "context": <enriched context>, "user_id": <unchanged>, "course_id": <unchanged>, }
- Return type:
Module contents#
Filter pipeline step implementations for edx-enterprise openedx-filters integrations.