Skip to content

Commit 0ae3b6a

Browse files
committed
fixup! fix: adjust studio_grading_url to use the correct URL
1 parent bcabd18 commit 0ae3b6a

4 files changed

Lines changed: 17 additions & 7 deletions

File tree

cms/envs/common.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,6 @@
256256

257257
MARKETING_EMAILS_OPT_IN = False
258258

259-
############################# MICROFRONTENDS ###################################
260-
COURSE_AUTHORING_MICROFRONTEND_URL = None
261-
262259
############################# SET PATH INFORMATION #############################
263260
PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx-platform/cms
264261
CMS_ROOT = REPO_ROOT / "cms" # noqa: F405

lms/djangoapps/instructor/tests/test_api_v2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def _get_url(self, course_id=None):
119119
course_id = str(self.course_key)
120120
return reverse('instructor_api_v2:course_metadata', kwargs={'course_id': course_id})
121121

122-
@override_settings(MFE_CONFIG={'COURSE_AUTHORING_MICROFRONTEND_URL': 'http://localhost:2001/authoring'})
122+
@override_settings(COURSE_AUTHORING_MICROFRONTEND_URL='http://localhost:2001/authoring')
123123
@override_settings(ADMIN_CONSOLE_MICROFRONTEND_URL='http://localhost:2025/admin-console')
124124
def test_get_course_metadata_as_instructor(self):
125125
"""

lms/djangoapps/instructor/views/serializers_v2.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,9 @@ def get_studio_grading_url(self, data):
467467
"""Get Studio MFE grading settings URL for the course."""
468468
course_key = data['course'].id
469469
mfe_base_url = configuration_helpers.get_value(
470-
'MFE_CONFIG',
471-
getattr(settings, 'MFE_CONFIG', None)
470+
'COURSE_AUTHORING_MICROFRONTEND_URL',
471+
getattr(settings, 'COURSE_AUTHORING_MICROFRONTEND_URL', None)
472472
)
473-
mfe_base_url = mfe_base_url.get('COURSE_AUTHORING_MICROFRONTEND_URL') if mfe_base_url else None
474473
if not mfe_base_url:
475474
return None
476475
return f'{mfe_base_url}/course/{course_key}/settings/grading'

openedx/envs/common.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,6 +1905,20 @@ def add_optional_apps(optional_apps, installed_apps):
19051905
# .. setting_description: Base URL of the micro-frontend-based learner home page.
19061906
LEARNER_HOME_MICROFRONTEND_URL = None
19071907

1908+
# .. setting_name: COURSE_AUTHORING_MICROFRONTEND_URL
1909+
# .. setting_default: http://apps.local.openedx.io:2001/authoring
1910+
# .. setting_description: Base URL of the micro-frontend-based course authoring (Studio) page.
1911+
# Used by both LMS and CMS backend code to construct links into the authoring MFE.
1912+
COURSE_AUTHORING_MICROFRONTEND_URL = "http://apps.local.openedx.io:2001/authoring"
1913+
1914+
# .. setting_name: ADMIN_CONSOLE_MICROFRONTEND_URL
1915+
# .. setting_default: None
1916+
# .. setting_description: Base URL of the micro-frontend-based admin console page.
1917+
# Used by LMS backend code to construct links into the admin console MFE.
1918+
# Although the admin console is CMS-centric, this setting lives in the shared
1919+
# base so both LMS and CMS can reference it without duplication.
1920+
ADMIN_CONSOLE_MICROFRONTEND_URL = None
1921+
19081922
################################## Swift ###################################
19091923

19101924
SWIFT_USERNAME = None

0 commit comments

Comments
 (0)