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
724c6c9e
Commit
724c6c9e
authored
Mar 01, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reapply Ike's pull-request in a new branch. The PR branch got mangled on the rebase by accident.
parent
11f864f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
cms/djangoapps/contentstore/utils.py
+9
-4
cms/djangoapps/contentstore/views.py
+5
-2
No files found.
cms/djangoapps/contentstore/utils.py
View file @
724c6c9e
...
...
@@ -80,10 +80,15 @@ def get_lms_link_for_item(location, preview=False, course_id=None):
course_id
=
get_course_id
(
location
)
if
settings
.
LMS_BASE
is
not
None
:
lms_link
=
"//{preview}{lms_base}/courses/{course_id}/jump_to/{location}"
.
format
(
preview
=
'preview.'
if
preview
else
''
,
lms_base
=
settings
.
LMS_BASE
,
course_id
=
course_id
,
if
preview
:
lms_base
=
settings
.
MITX_FEATURES
.
get
(
'PREVIEW_LMS_BASE'
,
'preview.'
+
settings
.
LMS_BASE
)
else
:
lms_base
=
settings
.
LMS_BASE
lms_link
=
"//{lms_base}/courses/{course_id}/jump_to/{location}"
.
format
(
lms_base
=
lms_base
,
course_id
=
course_id
,
location
=
Location
(
location
)
)
else
:
...
...
cms/djangoapps/contentstore/views.py
View file @
724c6c9e
...
...
@@ -317,8 +317,11 @@ def edit_unit(request, location):
break
index
=
index
+
1
preview_lms_link
=
'//{preview}{lms_base}/courses/{org}/{course}/{course_name}/courseware/{section}/{subsection}/{index}'
.
format
(
preview
=
'preview.'
,
preview_lms_base
=
settings
.
MITX_FEATURES
.
get
(
'PREVIEW_LMS_BASE'
,
'preview.'
+
settings
.
LMS_BASE
)
preview_lms_link
=
'//{preview_lms_base}/courses/{org}/{course}/{course_name}/courseware/{section}/{subsection}/{index}'
.
format
(
preview_lms_base
=
preview_lms_base
,
lms_base
=
settings
.
LMS_BASE
,
org
=
course
.
location
.
org
,
course
=
course
.
location
.
course
,
...
...
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