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
9725cff7
Commit
9725cff7
authored
Jul 30, 2013
by
Julian Arni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove get_preview_module.
And replace calls with calls to load_preview_module.
parent
6a7fa41e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
17 deletions
+2
-17
cms/djangoapps/contentstore/views/preview.py
+2
-17
No files found.
cms/djangoapps/contentstore/views/preview.py
View file @
9725cff7
...
...
@@ -105,7 +105,7 @@ def preview_module_system(request, preview_id, descriptor):
# TODO (cpennington): Do we want to track how instructors are using the preview problems?
track_function
=
lambda
event_type
,
event
:
None
,
filestore
=
descriptor
.
system
.
resources_fs
,
get_module
=
partial
(
get
_preview_module
,
request
,
preview_id
),
get_module
=
partial
(
load
_preview_module
,
request
,
preview_id
),
render_template
=
render_from_lms
,
debug
=
True
,
replace_urls
=
partial
(
static_replace
.
replace_static_urls
,
data_directory
=
None
,
course_namespace
=
descriptor
.
location
),
...
...
@@ -115,28 +115,13 @@ def preview_module_system(request, preview_id, descriptor):
)
def
get_preview_module
(
request
,
preview_id
,
descriptor
):
"""
Returns a preview XModule at the specified location. The preview_data is chosen arbitrarily
from the set of preview data for the descriptor specified by Location
request: The active django request
preview_id (str): An identifier specifying which preview this module is used for
location: A Location
"""
return
load_preview_module
(
request
,
preview_id
,
descriptor
)
def
load_preview_module
(
request
,
preview_id
,
descriptor
):
"""
Return a preview XModule instantiated from the supplied descriptor
, instance_state, and shared_state
Return a preview XModule instantiated from the supplied descriptor
.
request: The active django request
preview_id (str): An identifier specifying which preview this module is used for
descriptor: An XModuleDescriptor
instance_state: An instance state string
shared_state: A shared state string
"""
system
=
preview_module_system
(
request
,
preview_id
,
descriptor
)
try
:
...
...
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