Skip to content

Commit 0a71256

Browse files
authored
fix: remove edX support URL from login page (openedx#28593)
1 parent 809ed34 commit 0a71256

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

lms/static/js/student_account/views/LoginView.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,13 @@
225225
{
226226
email: error.responseJSON.email,
227227
platform_name: this.platform_name,
228-
support_url: 'https://support.edx.org/',
229228
line_break: HtmlUtils.HTML('<br/>'),
230229
strong_start: HtmlUtils.HTML('<strong>'),
231230
strong_end: HtmlUtils.HTML('</strong>'),
232231
anchorStart: HtmlUtils.HTML(
233232
StringUtils.interpolate(
234233
'<a href="{SupportUrl}">', {
235-
SupportUrl: 'https://support.edx.org/'
234+
SupportUrl: this.supportURL,
236235
}
237236
)
238237
),

openedx/core/djangoapps/site_configuration/helpers.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,21 @@ def get_value(val_name, default=None, **kwargs): # lint-amnesty, pylint: disabl
134134
else:
135135
configuration_value = default
136136

137-
# Attempt to perform a dictionary update using the provided default
138-
# This will fail if the default value is not a dictionary
139-
try:
140-
value = dict(default)
141-
value.update(configuration_value)
142-
143-
# If the dictionary update fails, just use the configuration value
144-
# TypeError: default is not iterable (simple value or None)
145-
# ValueError: default is iterable but not a dict (list, not dict)
146-
# AttributeError: default does not have an 'update' method
147-
except (TypeError, ValueError, AttributeError):
137+
if default == '':
148138
value = configuration_value
139+
else:
140+
# Attempt to perform a dictionary update using the provided default
141+
# This will fail if the default value is not a dictionary
142+
try:
143+
value = dict(default)
144+
value.update(configuration_value)
145+
146+
# If the dictionary update fails, just use the configuration value
147+
# TypeError: default is not iterable (simple value or None)
148+
# ValueError: default is iterable but not a dict (list, not dict)
149+
# AttributeError: default does not have an 'update' method
150+
except (TypeError, ValueError, AttributeError):
151+
value = configuration_value
149152

150153
# Return the end result to the caller
151154
return value

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ def test_get_value(self):
6767
# Test that the default value is returned if the value for the given key is not found in the configuration
6868
assert configuration_helpers.get_value('non_existent_name', 'dummy-default-value') == 'dummy-default-value'
6969

70+
# Test that correct default value is returned
71+
assert configuration_helpers.get_value('non_existent_name', '') == ''
72+
assert configuration_helpers.get_value('non_existent_name', None) is None
73+
7074
@with_site_configuration(configuration=test_config)
7175
def test_get_dict(self):
7276
"""

0 commit comments

Comments
 (0)