Skip to content

Commit e4c6aa6

Browse files
authored
Merge remote-tracking branch 'origin/master' into pwnage101/ENT-11563
2 parents 17c73e9 + 272718e commit e4c6aa6

3 files changed

Lines changed: 2 additions & 56 deletions

File tree

lms/djangoapps/grades/tests/test_events.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from unittest import mock
66
from unittest.mock import patch
7+
import pytest
78

89
from ccx_keys.locator import CCXLocator
910
from django.utils.timezone import now
@@ -299,7 +300,7 @@ def test_filter_exception_is_logged_and_raised(
299300

300301
from lms.djangoapps.grades.events import course_grade_passed_first_time
301302

302-
with self.assertRaisesRegex(Exception, "boom"):
303+
with pytest.raises(Exception, "boom"):
303304
course_grade_passed_first_time(self.user.id, self.course.id)
304305

305306
mock_log.exception.assert_called_once_with(

lms/envs/common.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3281,22 +3281,6 @@ def _should_send_certificate_events(settings):
32813281
# The project ID should be obtained from the Google Cloud Console when creating a reCAPTCHA
32823282
RECAPTCHA_PROJECT_ID = None
32833283

3284-
# .. setting_name: OPEN_EDX_FILTERS_CONFIG
3285-
# .. setting_default: {}
3286-
# .. setting_description: Configuration dict for openedx-filters pipeline steps.
3287-
# Keys are filter type strings; values are dicts with 'fail_silently' (bool) and
3288-
# 'pipeline' (list of dotted-path strings to PipelineStep subclasses).
3289-
OPEN_EDX_FILTERS_CONFIG = {
3290-
"org.openedx.learning.account.settings.read_only_fields.requested.v1": {
3291-
"fail_silently": True,
3292-
"pipeline": ["enterprise.filters.accounts.AccountSettingsReadOnlyFieldsStep"],
3293-
},
3294-
"org.openedx.learning.dashboard.render.started.v1": {
3295-
"fail_silently": False,
3296-
"pipeline": ["enterprise.filters.dashboard.DashboardContextEnricher"],
3297-
},
3298-
}
3299-
33003284
############################## Miscellaneous ###############################
33013285

33023286
# To limit the number of courses displayed on learner dashboard
@@ -3309,15 +3293,3 @@ def _should_send_certificate_events(settings):
33093293
SSL_AUTH_DN_FORMAT_STRING = (
33103294
"/C=US/ST=Massachusetts/O=Massachusetts Institute of Technology/OU=Client CA v1/CN={0}/emailAddress={1}"
33113295
)
3312-
3313-
# .. setting_name: OPEN_EDX_FILTERS_CONFIG
3314-
# .. setting_default: {}
3315-
# .. setting_description: Configuration dict for openedx-filters pipeline steps.
3316-
# Keys are filter type strings; values are dicts with 'fail_silently' (bool) and
3317-
# 'pipeline' (list of dotted-path strings to PipelineStep subclasses).
3318-
OPEN_EDX_FILTERS_CONFIG = {
3319-
"org.openedx.learning.grade.context.requested.v1": {
3320-
"fail_silently": True,
3321-
"pipeline": ["enterprise.filters.grades.GradeEventContextEnricher"],
3322-
},
3323-
}

lms/envs/production.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ def get_env_setting(setting):
8585
'EVENT_BUS_PRODUCER_CONFIG',
8686
'DEFAULT_FILE_STORAGE',
8787
'STATICFILES_STORAGE',
88-
'OPEN_EDX_FILTERS_CONFIG',
8988
]
9089
})
9190

@@ -280,19 +279,6 @@ def get_env_setting(setting):
280279
EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST # noqa: F405
281280
)
282281

283-
# Merge OPEN_EDX_FILTERS_CONFIG from YAML into the default defined in common.py.
284-
# Pipeline steps from YAML are appended after steps defined in common.py.
285-
# The fail_silently value from YAML takes precedence over the one in common.py.
286-
for _filter_type, _filter_config in _YAML_TOKENS.get('OPEN_EDX_FILTERS_CONFIG', {}).items():
287-
if _filter_type in OPEN_EDX_FILTERS_CONFIG: # noqa: F405
288-
OPEN_EDX_FILTERS_CONFIG[_filter_type]['pipeline'].extend( # noqa: F405
289-
_filter_config.get('pipeline', [])
290-
)
291-
if 'fail_silently' in _filter_config:
292-
OPEN_EDX_FILTERS_CONFIG[_filter_type]['fail_silently'] = _filter_config['fail_silently'] # noqa: F405
293-
else:
294-
OPEN_EDX_FILTERS_CONFIG[_filter_type] = _filter_config # noqa: F405
295-
296282
if ENABLE_THIRD_PARTY_AUTH: # noqa: F405
297283
AUTHENTICATION_BACKENDS = _YAML_TOKENS.get('THIRD_PARTY_AUTH_BACKENDS', [
298284
'social_core.backends.google.GoogleOAuth2',
@@ -530,19 +516,6 @@ def get_env_setting(setting):
530516
_YAML_TOKENS.get('EVENT_BUS_PRODUCER_CONFIG', {})
531517
)
532518

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-
546519
#######################################################################################################################
547520
# HEY! Don't add anything to the end of this file.
548521
# Add your defaults to common.py instead!

0 commit comments

Comments
 (0)