Commit d5bff2e2 by David Ormsbee

Merge pull request #814 from edx/bugfix/ichuang/make-edit-link-use-static-asset-path

fix: make edit link use static_asset_path in xmodule_modifiers.py
parents 421f0251 757ce61d
...@@ -170,7 +170,7 @@ def add_histogram(user, block, view, frag, context): # pylint: disable=unused-a ...@@ -170,7 +170,7 @@ def add_histogram(user, block, view, frag, context): # pylint: disable=unused-a
# if original, unmangled filename exists then use it (github # if original, unmangled filename exists then use it (github
# doesn't like symlinks) # doesn't like symlinks)
filepath = filename filepath = filename
data_dir = osfs.root_path.rsplit('/')[-1] data_dir = block.static_asset_path or osfs.root_path.rsplit('/')[-1]
giturl = block.giturl or 'https://github.com/MITx' giturl = block.giturl or 'https://github.com/MITx'
edit_link = "%s/%s/tree/master/%s" % (giturl, data_dir, filepath) edit_link = "%s/%s/tree/master/%s" % (giturl, data_dir, filepath)
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment