Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
c604cada
Commit
c604cada
authored
Oct 27, 2016
by
Douglas Hall
Committed by
GitHub
Oct 27, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13830 from edx/hasnain-naveed/WL-614
WL-614 | In Studio "View Live" button fix for theming.
parents
26d5a5c3
b2572ee2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
cms/djangoapps/contentstore/utils.py
+17
-4
No files found.
cms/djangoapps/contentstore/utils.py
View file @
c604cada
...
...
@@ -13,6 +13,7 @@ from django_comment_common.models import assign_default_role
from
django_comment_common.utils
import
seed_permissions_roles
from
openedx.core.djangoapps.self_paced.models
import
SelfPacedConfiguration
from
openedx.core.djangoapps.site_configuration.models
import
SiteConfiguration
from
xmodule.modulestore
import
ModuleStoreEnum
from
xmodule.modulestore.django
import
modulestore
...
...
@@ -88,13 +89,25 @@ def get_lms_link_for_item(location, preview=False):
"""
assert
isinstance
(
location
,
UsageKey
)
if
settings
.
LMS_BASE
is
None
:
# checks LMS_BASE value in site configuration for the given course_org_filter(org)
# if not found returns settings.LMS_BASE
lms_base
=
SiteConfiguration
.
get_value_for_org
(
location
.
org
,
"LMS_BASE"
,
settings
.
LMS_BASE
)
if
lms_base
is
None
:
return
None
if
preview
:
lms_base
=
settings
.
FEATURES
.
get
(
'PREVIEW_LMS_BASE'
)
else
:
lms_base
=
settings
.
LMS_BASE
# 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
u"//{lms_base}/courses/{course_key}/jump_to/{location}"
.
format
(
lms_base
=
lms_base
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment