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
d6f794c4
Commit
d6f794c4
authored
Jul 30, 2013
by
Vasyl Nakvasiuk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gst module: add configuration and render properties
parent
57bc010a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
common/lib/xmodule/xmodule/gst_module.py
+10
-6
No files found.
common/lib/xmodule/xmodule/gst_module.py
View file @
d6f794c4
...
...
@@ -92,6 +92,16 @@ class GraphicalSliderToolModule(GraphicalSliderToolFields, XModule):
css
=
{
'scss'
:
[
resource_string
(
__name__
,
'css/gst/display.scss'
)]}
js_module_name
=
"GraphicalSliderTool"
@property
def
configuration
(
self
):
return
stringify_children
(
html
.
fromstring
(
self
.
data
)
.
xpath
(
'configuration'
)[
0
])
@property
def
render
(
self
):
return
stringify_children
(
html
.
fromstring
(
self
.
data
)
.
xpath
(
'render'
)[
0
])
def
get_html
(
self
):
""" Renders parameters to template. """
...
...
@@ -99,12 +109,6 @@ class GraphicalSliderToolModule(GraphicalSliderToolFields, XModule):
self
.
html_id
=
self
.
location
.
html_id
()
self
.
html_class
=
self
.
location
.
category
self
.
configuration
=
html
.
fromstring
(
self
.
data
)
.
xpath
(
'configuration'
)[
0
]
self
.
configuration
=
stringify_children
(
self
.
configuration
)
self
.
render
=
html
.
fromstring
(
self
.
data
)
.
xpath
(
'render'
)[
0
]
self
.
render
=
stringify_children
(
self
.
render
)
self
.
configuration_json
=
self
.
build_configuration_json
()
params
=
{
'gst_html'
:
self
.
substitute_controls
(
self
.
render
),
...
...
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