Skip to content

Commit ba02ae2

Browse files
feanilclaude
andcommitted
feat: remove ENABLE_MKTG_SITE from CMS, registration tests, and docs
- contentstore utils: marketing_enabled is always True - registration tests: remove ENABLE_MKTG_SITE=False test cases that tested now-dead local URL generation for honor code and TOS links; remove ENABLE_MKTG_SITE=True decorators from the remaining tests - site_configuration test mixin: remove ENABLE_MKTG_SITE example key - schedules README: remove ENABLE_MKTG_SITE from example config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f055bb9 commit ba02ae2

5 files changed

Lines changed: 2 additions & 91 deletions

File tree

cms/djangoapps/contentstore/rest_api/v1/views/tests/test_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_course_settings_response(self):
4747
"is_prerequisite_courses_enabled": False,
4848
"language_options": settings.ALL_LANGUAGES,
4949
"lms_link_for_about_page": get_link_for_about_page(self.course),
50-
"marketing_enabled": False,
50+
"marketing_enabled": True,
5151
"mfe_proctored_exam_settings_url": get_proctored_exam_settings_url(
5252
self.course.id
5353
),

cms/djangoapps/contentstore/utils.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,11 +1387,7 @@ def get_course_settings(request, course_key, course_block):
13871387
'ENABLE_PUBLISHER',
13881388
settings.FEATURES.get('ENABLE_PUBLISHER', False)
13891389
)
1390-
marketing_enabled = configuration_helpers.get_value_for_org(
1391-
course_block.location.org,
1392-
'ENABLE_MKTG_SITE',
1393-
settings.FEATURES.get('ENABLE_MKTG_SITE', False)
1394-
)
1390+
marketing_enabled = True
13951391
enable_extended_course_details = configuration_helpers.get_value_for_org(
13961392
course_block.location.org,
13971393
'ENABLE_EXTENDED_COURSE_DETAILS',

openedx/core/djangoapps/schedules/docs/README.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,6 @@ add/change the following:
208208

209209
.. code:: python
210210
211-
FEATURES = {
212-
'ENABLE_MKTG_SITE': True,
213-
}
214211
MKTG_URLS = {
215212
'ROOT': '<insert_lms_url_here>',
216213
}

openedx/core/djangoapps/site_configuration/tests/mixins.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def setUp(self):
3333
"SITE_NAME": self.site_other.domain,
3434
"SESSION_COOKIE_DOMAIN": self.site_other.domain,
3535
"course_org_filter": "fakeOtherX",
36-
"ENABLE_MKTG_SITE": True,
3736
"SHOW_ECOMMERCE_REPORTS": True,
3837
"MKTG_URLS": {
3938
"ROOT": "https://marketing.fakeother",

openedx/core/djangoapps/user_authn/views/tests/test_register.py

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,6 @@ def test_registration_form_confirm_email(self):
11271127
@override_settings(
11281128
MKTG_URLS={"ROOT": "https://www.test.com/", "HONOR": "honor"},
11291129
)
1130-
@mock.patch.dict(settings.FEATURES, {"ENABLE_MKTG_SITE": True})
11311130
def test_registration_honor_code_mktg_site_enabled(self):
11321131
link_template = "<a href='https://www.test.com/honor' rel='noopener' target='_blank'>{link_label}</a>"
11331132
link_template2 = "<a href='#' rel='noopener' target='_blank'>{link_label}</a>"
@@ -1159,44 +1158,11 @@ def test_registration_honor_code_mktg_site_enabled(self):
11591158
}
11601159
)
11611160

1162-
@override_settings(MKTG_URLS_LINK_MAP={"HONOR": "honor"})
1163-
@mock.patch.dict(settings.FEATURES, {"ENABLE_MKTG_SITE": False})
1164-
def test_registration_honor_code_mktg_site_disabled(self):
1165-
link_template = "<a href='/privacy' rel='noopener' target='_blank'>{link_label}</a>"
1166-
link_label = "Terms of Service and Honor Code"
1167-
link_label2 = "Privacy Policy"
1168-
self._assert_reg_field(
1169-
{"honor_code": "required"},
1170-
{
1171-
"label": ("By creating an account, you agree to the {spacing}"
1172-
"{link_label} {spacing}"
1173-
"and you acknowledge that {platform_name} and each Member process your "
1174-
"personal data in accordance {spacing}"
1175-
"with the {link_label2}.").format(
1176-
platform_name=settings.PLATFORM_NAME,
1177-
link_label=self.link_template.format(link_label=link_label),
1178-
link_label2=link_template.format(link_label=link_label2),
1179-
spacing=' ' * 18
1180-
),
1181-
"name": "honor_code",
1182-
"defaultValue": False,
1183-
"type": "plaintext",
1184-
"required": True,
1185-
"errorMessages": {
1186-
"required": "You must agree to the {platform_name} {link_label}".format( # noqa: UP032
1187-
platform_name=settings.PLATFORM_NAME,
1188-
link_label=link_label
1189-
)
1190-
}
1191-
}
1192-
)
1193-
11941161
@override_settings(MKTG_URLS={
11951162
"ROOT": "https://www.test.com/",
11961163
"HONOR": "honor",
11971164
"TOS": "tos",
11981165
})
1199-
@mock.patch.dict(settings.FEATURES, {"ENABLE_MKTG_SITE": True})
12001166
def test_registration_separate_terms_of_service_mktg_site_enabled(self):
12011167
# Honor code field should say ONLY honor code,
12021168
# not "terms of service and honor code"
@@ -1245,53 +1211,6 @@ def test_registration_separate_terms_of_service_mktg_site_enabled(self):
12451211
}
12461212
)
12471213

1248-
@override_settings(MKTG_URLS_LINK_MAP={"HONOR": "honor", "TOS": "tos"})
1249-
@mock.patch.dict(settings.FEATURES, {"ENABLE_MKTG_SITE": False})
1250-
def test_registration_separate_terms_of_service_mktg_site_disabled(self):
1251-
# Honor code field should say ONLY honor code,
1252-
# not "terms of service and honor code"
1253-
link_label = 'Honor Code'
1254-
self._assert_reg_field(
1255-
{"honor_code": "required", "terms_of_service": "required"},
1256-
{
1257-
"label": "I agree to the {platform_name} {link_label}".format( # noqa: UP032
1258-
platform_name=settings.PLATFORM_NAME,
1259-
link_label=self.link_template.format(link_label=link_label)
1260-
),
1261-
"name": "honor_code",
1262-
"defaultValue": False,
1263-
"type": "checkbox",
1264-
"required": True,
1265-
"errorMessages": {
1266-
"required": "You must agree to the {platform_name} Honor Code".format( # noqa: UP032
1267-
platform_name=settings.PLATFORM_NAME
1268-
)
1269-
}
1270-
}
1271-
)
1272-
1273-
link_label = 'Terms of Service'
1274-
# Terms of service field should also be present
1275-
link_template = "<a href='/tos' rel='noopener' target='_blank'>{link_label}</a>"
1276-
self._assert_reg_field(
1277-
{"honor_code": "required", "terms_of_service": "required"},
1278-
{
1279-
"label": "I agree to the {platform_name} {link_label}".format( # noqa: UP032
1280-
platform_name=settings.PLATFORM_NAME,
1281-
link_label=link_template.format(link_label=link_label)
1282-
),
1283-
"name": "terms_of_service",
1284-
"defaultValue": False,
1285-
"type": "checkbox",
1286-
"required": True,
1287-
"errorMessages": {
1288-
"required": "You must agree to the {platform_name} Terms of Service".format( # noqa: UP032
1289-
platform_name=settings.PLATFORM_NAME
1290-
)
1291-
}
1292-
}
1293-
)
1294-
12951214
@override_settings(
12961215
REGISTRATION_EXTRA_FIELDS={
12971216
"level_of_education": "optional",

0 commit comments

Comments
 (0)