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
7bfb0804
Commit
7bfb0804
authored
Aug 02, 2013
by
Julian Arni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to studio_view
parent
562456ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
cms/djangoapps/contentstore/views/preview.py
+5
-1
No files found.
cms/djangoapps/contentstore/views/preview.py
View file @
7bfb0804
...
@@ -75,9 +75,13 @@ def preview_component(request, location):
...
@@ -75,9 +75,13 @@ def preview_component(request, location):
component
=
modulestore
()
.
get_item
(
location
)
component
=
modulestore
()
.
get_item
(
location
)
# wrap_xmodule expects a function, so make a constant function
def
get_render
():
return
component
.
runtime
.
render
(
component
,
None
,
"studio_view"
)
.
content
return
render_to_response
(
'component.html'
,
{
return
render_to_response
(
'component.html'
,
{
'preview'
:
get_module_previews
(
request
,
component
)[
0
],
'preview'
:
get_module_previews
(
request
,
component
)[
0
],
'editor'
:
wrap_xmodule
(
component
.
get_html
,
component
,
'xmodule_edit.html'
)(),
'editor'
:
wrap_xmodule
(
get_render
,
component
,
'xmodule_edit.html'
)(),
})
})
...
...
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