From 288f52201bf0d15f4b6298bad0f3daa04605b1ed Mon Sep 17 00:00:00 2001 From: magajh Date: Fri, 22 Oct 2021 09:37:52 -0400 Subject: [PATCH] LD-9: Remove preview and get urls for org --- cms/djangoapps/contentstore/utils.py | 11 +---------- cms/templates/container.html | 2 +- common/djangoapps/util/course.py | 8 +++++++- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 7791bb68123..f51fa22313b 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -104,7 +104,7 @@ def _remove_instructors(course_key): log.error(f"Error in deleting course groups for {course_key}: {err}") -def get_lms_link_for_item(location, preview=False): +def get_lms_link_for_item(location, preview=False): # pylint: disable=unused-argument """ Returns an LMS link to the course with a jump_to to the provided location. @@ -124,15 +124,6 @@ def get_lms_link_for_item(location, preview=False): if lms_base is None: return None - if preview: - # checks PREVIEW_LMS_BASE value in site configuration for the given course_org_filter(org) - # if not found returns settings.FEATURES.get('PREVIEW_LMS_BASE') - lms_base = SiteConfiguration.get_value_for_org( - location.org, - "PREVIEW_LMS_BASE", - settings.FEATURES.get('PREVIEW_LMS_BASE') - ) - return "//{lms_base}/courses/{course_key}/jump_to/{location}".format( lms_base=lms_base, course_key=str(location.course_key), diff --git a/cms/templates/container.html b/cms/templates/container.html index 17de3d20ea7..ffafa8d96e2 100644 --- a/cms/templates/container.html +++ b/cms/templates/container.html @@ -138,7 +138,7 @@

${_("Page Actions")}

${_("View Live Version")} -