Skip to content

Commit fa66d0b

Browse files
authored
fix: test failures
1 parent d11c292 commit fa66d0b

3 files changed

Lines changed: 8 additions & 30 deletions

File tree

lms/djangoapps/grades/events.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ def course_grade_passed_first_time(user_id, course_id):
166166
"""
167167
event_name = COURSE_GRADE_PASSED_FIRST_TIME_EVENT_TYPE
168168
context = contexts.course_context_from_course_id(course_id)
169-
enriched_context = GradeEventContextRequested.run_filter(
169+
filtered_context, _, _ = GradeEventContextRequested.run_filter(
170170
context=context, user_id=user_id, course_id=course_id
171171
)
172-
if enriched_context is not None:
173-
context = enriched_context
172+
if filtered_context is not None:
173+
context = filtered_context
174174
# TODO (AN-6134): remove this context manager
175175
with tracker.get_tracker().context(event_name, context):
176176
tracker.emit(

lms/envs/common.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3290,9 +3290,13 @@ def _should_send_certificate_events(settings):
32903290
# 'pipeline' (list of dotted-path strings to PipelineStep subclasses).
32913291
OPEN_EDX_FILTERS_CONFIG = {
32923292
"org.openedx.learning.account.settings.read_only_fields.requested.v1": {
3293-
"fail_silently": True,
3293+
"fail_silently": False,
32943294
"pipeline": ["enterprise.filters.accounts.AccountSettingsReadOnlyFieldsStep"],
32953295
},
3296+
"org.openedx.learning.dashboard.render.started.v1": {
3297+
"fail_silently": False,
3298+
"pipeline": ["enterprise.filters.dashboard.DashboardContextEnricher"],
3299+
},
32963300
}
32973301

32983302
############################## Miscellaneous ###############################
@@ -3307,15 +3311,3 @@ def _should_send_certificate_events(settings):
33073311
SSL_AUTH_DN_FORMAT_STRING = (
33083312
"/C=US/ST=Massachusetts/O=Massachusetts Institute of Technology/OU=Client CA v1/CN={0}/emailAddress={1}"
33093313
)
3310-
3311-
# .. setting_name: OPEN_EDX_FILTERS_CONFIG
3312-
# .. setting_default: {}
3313-
# .. setting_description: Configuration dict for openedx-filters pipeline steps.
3314-
# Keys are filter type strings; values are dicts with 'fail_silently' (bool) and
3315-
# 'pipeline' (list of dotted-path strings to PipelineStep subclasses).
3316-
OPEN_EDX_FILTERS_CONFIG = {
3317-
"org.openedx.learning.grade.context.requested.v1": {
3318-
"fail_silently": True,
3319-
"pipeline": [],
3320-
},
3321-
}

lms/envs/production.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -529,20 +529,6 @@ def get_env_setting(setting):
529529
EVENT_BUS_PRODUCER_CONFIG, # noqa: F405
530530
_YAML_TOKENS.get('EVENT_BUS_PRODUCER_CONFIG', {})
531531
)
532-
533-
# Merge OPEN_EDX_FILTERS_CONFIG from YAML into the default defined in common.py.
534-
# Pipeline steps from YAML are appended after steps defined in common.py.
535-
# The fail_silently value from YAML takes precedence over the one in common.py.
536-
for _filter_type, _filter_config in _YAML_TOKENS.get('OPEN_EDX_FILTERS_CONFIG', {}).items():
537-
if _filter_type in OPEN_EDX_FILTERS_CONFIG:
538-
OPEN_EDX_FILTERS_CONFIG[_filter_type]['pipeline'].extend(
539-
_filter_config.get('pipeline', [])
540-
)
541-
if 'fail_silently' in _filter_config:
542-
OPEN_EDX_FILTERS_CONFIG[_filter_type]['fail_silently'] = _filter_config['fail_silently']
543-
else:
544-
OPEN_EDX_FILTERS_CONFIG[_filter_type] = _filter_config
545-
546532
#######################################################################################################################
547533
# HEY! Don't add anything to the end of this file.
548534
# Add your defaults to common.py instead!

0 commit comments

Comments
 (0)