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
c1e03791
Commit
c1e03791
authored
Aug 07, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add docstring on StaticContent utility method
parent
bffec584
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
+8
-1
common/lib/xmodule/xmodule/contentstore/content.py
+7
-0
common/lib/xmodule/xmodule/js/spec/html/edit_spec.coffee
+1
-1
No files found.
common/lib/xmodule/xmodule/contentstore/content.py
View file @
c1e03791
...
...
@@ -60,6 +60,13 @@ class StaticContent(object):
@staticmethod
def
get_static_path_from_location
(
location
):
"""
This utility static method will take a location identifier and create a 'durable' /static/.. URL representation of it.
This link is 'durable' as it can maintain integrity across cloning of courseware across course-ids, e.g. reruns of
courses.
In the LMS/CMS, we have runtime link-rewriting, so at render time, this /static/... format will get translated into
the actual /c4x/... path which the client needs to reference static content
"""
if
location
is
not
None
:
return
"/static/{name}"
.
format
(
**
location
.
dict
())
else
:
...
...
common/lib/xmodule/xmodule/js/spec/html/edit_spec.coffee
View file @
c1e03791
...
...
@@ -98,7 +98,7 @@ describe 'HTMLEditingDescriptor', ->
expect
(
visualEditorStub
.
isDirty
()).
toEqual
(
false
)
expect
(
visualEditorStub
.
getContent
()).
toEqual
(
'Advanced Editor Text'
)
expect
(
visualEditorStub
.
startContent
).
toEqual
(
'Advanced Editor Text'
)
it
'When switching to
Advanced Editors
links are rewritten to c4x format'
,
->
it
'When switching to
visual editor
links are rewritten to c4x format'
,
->
loadFixtures
'html-edit-with-links.html'
@
descriptor
=
new
HTMLEditingDescriptor
(
$
(
'.html-edit'
))
@
descriptor
.
base_asset_url
=
'/c4x/foo/bar/asset/'
...
...
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