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
f872e41d
Commit
f872e41d
authored
Aug 07, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added descriptor to xmodule init. Now xmodules have pointer to their descriptor.
parent
3dffcaca
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
15 deletions
+17
-15
common/lib/xmodule/xmodule/abtest_module.py
+2
-2
common/lib/xmodule/xmodule/capa_module.py
+2
-2
common/lib/xmodule/xmodule/html_module.py
+2
-2
common/lib/xmodule/xmodule/seq_module.py
+2
-2
common/lib/xmodule/xmodule/template_module.py
+2
-2
common/lib/xmodule/xmodule/vertical_module.py
+2
-2
common/lib/xmodule/xmodule/video_module.py
+2
-2
common/lib/xmodule/xmodule/x_module.py
+3
-1
No files found.
common/lib/xmodule/xmodule/abtest_module.py
View file @
f872e41d
...
@@ -31,8 +31,8 @@ class ABTestModule(XModule):
...
@@ -31,8 +31,8 @@ class ABTestModule(XModule):
Implements an A/B test with an aribtrary number of competing groups
Implements an A/B test with an aribtrary number of competing groups
"""
"""
def
__init__
(
self
,
system
,
location
,
definition
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
def
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
instance_state
,
shared_state
,
**
kwargs
)
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
,
shared_state
,
**
kwargs
)
if
shared_state
is
None
:
if
shared_state
is
None
:
...
...
common/lib/xmodule/xmodule/capa_module.py
View file @
f872e41d
...
@@ -80,9 +80,9 @@ class CapaModule(XModule):
...
@@ -80,9 +80,9 @@ class CapaModule(XModule):
js_module_name
=
"Problem"
js_module_name
=
"Problem"
css
=
{
'scss'
:
[
resource_string
(
__name__
,
'css/capa/display.scss'
)]}
css
=
{
'scss'
:
[
resource_string
(
__name__
,
'css/capa/display.scss'
)]}
def
__init__
(
self
,
system
,
location
,
definition
,
instance_state
=
None
,
def
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
shared_state
=
None
,
**
kwargs
):
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
instance_state
,
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
,
shared_state
,
**
kwargs
)
shared_state
,
**
kwargs
)
self
.
attempts
=
0
self
.
attempts
=
0
...
...
common/lib/xmodule/xmodule/html_module.py
View file @
f872e41d
...
@@ -17,9 +17,9 @@ class HtmlModule(XModule):
...
@@ -17,9 +17,9 @@ class HtmlModule(XModule):
def
get_html
(
self
):
def
get_html
(
self
):
return
self
.
html
return
self
.
html
def
__init__
(
self
,
system
,
location
,
definition
,
def
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
,
shared_state
,
**
kwargs
)
instance_state
,
shared_state
,
**
kwargs
)
self
.
html
=
self
.
definition
[
'data'
]
self
.
html
=
self
.
definition
[
'data'
]
...
...
common/lib/xmodule/xmodule/seq_module.py
View file @
f872e41d
...
@@ -25,9 +25,9 @@ class SequenceModule(XModule):
...
@@ -25,9 +25,9 @@ class SequenceModule(XModule):
css
=
{
'scss'
:
[
resource_string
(
__name__
,
'css/sequence/display.scss'
)]}
css
=
{
'scss'
:
[
resource_string
(
__name__
,
'css/sequence/display.scss'
)]}
js_module_name
=
"Sequence"
js_module_name
=
"Sequence"
def
__init__
(
self
,
system
,
location
,
definition
,
instance_state
=
None
,
def
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
shared_state
=
None
,
**
kwargs
):
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
,
shared_state
,
**
kwargs
)
instance_state
,
shared_state
,
**
kwargs
)
self
.
position
=
1
self
.
position
=
1
...
...
common/lib/xmodule/xmodule/template_module.py
View file @
f872e41d
...
@@ -26,9 +26,9 @@ class CustomTagModule(XModule):
...
@@ -26,9 +26,9 @@ class CustomTagModule(XModule):
More information given in <a href="/book/234">the text</a>
More information given in <a href="/book/234">the text</a>
"""
"""
def
__init__
(
self
,
system
,
location
,
definition
,
def
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
,
shared_state
,
**
kwargs
)
instance_state
,
shared_state
,
**
kwargs
)
xmltree
=
etree
.
fromstring
(
self
.
definition
[
'data'
])
xmltree
=
etree
.
fromstring
(
self
.
definition
[
'data'
])
...
...
common/lib/xmodule/xmodule/vertical_module.py
View file @
f872e41d
...
@@ -10,8 +10,8 @@ class_priority = ['video', 'problem']
...
@@ -10,8 +10,8 @@ class_priority = ['video', 'problem']
class
VerticalModule
(
XModule
):
class
VerticalModule
(
XModule
):
''' Layout module for laying out submodules vertically.'''
''' Layout module for laying out submodules vertically.'''
def
__init__
(
self
,
system
,
location
,
definition
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
def
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
instance_state
,
shared_state
,
**
kwargs
)
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
,
shared_state
,
**
kwargs
)
self
.
contents
=
None
self
.
contents
=
None
def
get_html
(
self
):
def
get_html
(
self
):
...
...
common/lib/xmodule/xmodule/video_module.py
View file @
f872e41d
...
@@ -23,9 +23,9 @@ class VideoModule(XModule):
...
@@ -23,9 +23,9 @@ class VideoModule(XModule):
css
=
{
'scss'
:
[
resource_string
(
__name__
,
'css/video/display.scss'
)]}
css
=
{
'scss'
:
[
resource_string
(
__name__
,
'css/video/display.scss'
)]}
js_module_name
=
"Video"
js_module_name
=
"Video"
def
__init__
(
self
,
system
,
location
,
definition
,
def
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
XModule
.
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
,
shared_state
,
**
kwargs
)
instance_state
,
shared_state
,
**
kwargs
)
xmltree
=
etree
.
fromstring
(
self
.
definition
[
'data'
])
xmltree
=
etree
.
fromstring
(
self
.
definition
[
'data'
])
self
.
youtube
=
xmltree
.
get
(
'youtube'
)
self
.
youtube
=
xmltree
.
get
(
'youtube'
)
...
...
common/lib/xmodule/xmodule/x_module.py
View file @
f872e41d
...
@@ -142,7 +142,7 @@ class XModule(HTMLSnippet):
...
@@ -142,7 +142,7 @@ class XModule(HTMLSnippet):
# in the module
# in the module
icon_class
=
'other'
icon_class
=
'other'
def
__init__
(
self
,
system
,
location
,
definition
,
def
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
'''
'''
Construct a new xmodule
Construct a new xmodule
...
@@ -188,6 +188,7 @@ class XModule(HTMLSnippet):
...
@@ -188,6 +188,7 @@ class XModule(HTMLSnippet):
self
.
system
=
system
self
.
system
=
system
self
.
location
=
Location
(
location
)
self
.
location
=
Location
(
location
)
self
.
definition
=
definition
self
.
definition
=
definition
self
.
descriptor
=
descriptor
self
.
instance_state
=
instance_state
self
.
instance_state
=
instance_state
self
.
shared_state
=
shared_state
self
.
shared_state
=
shared_state
self
.
id
=
self
.
location
.
url
()
self
.
id
=
self
.
location
.
url
()
...
@@ -426,6 +427,7 @@ class XModuleDescriptor(Plugin, HTMLSnippet):
...
@@ -426,6 +427,7 @@ class XModuleDescriptor(Plugin, HTMLSnippet):
system
,
system
,
self
.
location
,
self
.
location
,
self
.
definition
,
self
.
definition
,
self
,
metadata
=
self
.
metadata
metadata
=
self
.
metadata
)
)
...
...
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