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
821e1549
Commit
821e1549
authored
Oct 02, 2014
by
Alan Boudreault
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert deprecated block_type change for local_resource_url
parent
68610ec1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
cms/djangoapps/contentstore/views/preview.py
+2
-2
cms/lib/xblock/runtime.py
+2
-2
common/lib/xmodule/xmodule/x_module.py
+2
-2
lms/lib/xblock/runtime.py
+2
-2
No files found.
cms/djangoapps/contentstore/views/preview.py
View file @
821e1549
...
@@ -91,8 +91,8 @@ class PreviewModuleSystem(ModuleSystem): # pylint: disable=abstract-method
...
@@ -91,8 +91,8 @@ class PreviewModuleSystem(ModuleSystem): # pylint: disable=abstract-method
'suffix'
:
suffix
,
'suffix'
:
suffix
,
})
+
'?'
+
query
})
+
'?'
+
query
def
local_resource_url
(
self
,
block
,
uri
,
block_type
=
None
):
def
local_resource_url
(
self
,
block
,
uri
):
return
local_resource_url
(
block
,
uri
,
block_type
)
return
local_resource_url
(
block
,
uri
)
class
StudioUserService
(
object
):
class
StudioUserService
(
object
):
...
...
cms/lib/xblock/runtime.py
View file @
821e1549
...
@@ -25,11 +25,11 @@ def handler_url(block, handler_name, suffix='', query='', thirdparty=False):
...
@@ -25,11 +25,11 @@ def handler_url(block, handler_name, suffix='', query='', thirdparty=False):
return
url
return
url
def
local_resource_url
(
block
,
uri
,
block_type
=
None
):
def
local_resource_url
(
block
,
uri
):
"""
"""
local_resource_url for Studio
local_resource_url for Studio
"""
"""
return
reverse
(
'xblock_resource_url'
,
kwargs
=
{
return
reverse
(
'xblock_resource_url'
,
kwargs
=
{
'block_type'
:
block
_type
or
block
.
scope_ids
.
block_type
,
'block_type'
:
block
.
scope_ids
.
block_type
,
'uri'
:
uri
,
'uri'
:
uri
,
})
})
common/lib/xmodule/xmodule/x_module.py
View file @
821e1549
...
@@ -1178,13 +1178,13 @@ class DescriptorSystem(MetricsMixin, ConfigurableFragmentWrapper, Runtime): # p
...
@@ -1178,13 +1178,13 @@ class DescriptorSystem(MetricsMixin, ConfigurableFragmentWrapper, Runtime): # p
# global function that the application can override.
# global function that the application can override.
return
descriptor_global_handler_url
(
block
,
handler_name
,
suffix
,
query
,
thirdparty
)
return
descriptor_global_handler_url
(
block
,
handler_name
,
suffix
,
query
,
thirdparty
)
def
local_resource_url
(
self
,
block
,
uri
,
block_type
=
None
):
def
local_resource_url
(
self
,
block
,
uri
):
"""
"""
See :meth:`xblock.runtime.Runtime:local_resource_url` for documentation.
See :meth:`xblock.runtime.Runtime:local_resource_url` for documentation.
"""
"""
xmodule_runtime
=
getattr
(
block
,
'xmodule_runtime'
,
None
)
xmodule_runtime
=
getattr
(
block
,
'xmodule_runtime'
,
None
)
if
xmodule_runtime
is
not
None
:
if
xmodule_runtime
is
not
None
:
return
xmodule_runtime
.
local_resource_url
(
block
,
uri
,
block_type
)
return
xmodule_runtime
.
local_resource_url
(
block
,
uri
)
else
:
else
:
# Currently, Modulestore is responsible for instantiating DescriptorSystems
# Currently, Modulestore is responsible for instantiating DescriptorSystems
# This means that LMS/CMS don't have a way to define a subclass of DescriptorSystem
# This means that LMS/CMS don't have a way to define a subclass of DescriptorSystem
...
...
lms/lib/xblock/runtime.py
View file @
821e1549
...
@@ -114,12 +114,12 @@ class LmsHandlerUrls(object):
...
@@ -114,12 +114,12 @@ class LmsHandlerUrls(object):
return
url
return
url
def
local_resource_url
(
self
,
block
,
uri
,
block_type
=
None
):
def
local_resource_url
(
self
,
block
,
uri
):
"""
"""
local_resource_url for Studio
local_resource_url for Studio
"""
"""
path
=
reverse
(
'xblock_resource_url'
,
kwargs
=
{
path
=
reverse
(
'xblock_resource_url'
,
kwargs
=
{
'block_type'
:
block
_type
or
block
.
scope_ids
.
block_type
,
'block_type'
:
block
.
scope_ids
.
block_type
,
'uri'
:
uri
,
'uri'
:
uri
,
})
})
return
'//{}{}'
.
format
(
settings
.
SITE_NAME
,
path
)
return
'//{}{}'
.
format
(
settings
.
SITE_NAME
,
path
)
...
...
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