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
1d3f8f06
Commit
1d3f8f06
authored
Feb 05, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass display name and content link rewriting down the chain
parent
8e7fa6c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
common/lib/xmodule/xmodule/combined_open_ended_module.py
+5
-1
common/lib/xmodule/xmodule/combined_open_ended_modulev1.py
+5
-2
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
1d3f8f06
...
@@ -137,10 +137,14 @@ class CombinedOpenEndedModule(XModule):
...
@@ -137,10 +137,14 @@ class CombinedOpenEndedModule(XModule):
self
.
version
=
DEFAULT_VERSION
self
.
version
=
DEFAULT_VERSION
version_index
=
versions
.
index
(
self
.
version
)
version_index
=
versions
.
index
(
self
.
version
)
static_data
=
{
'rewrite_content_links'
:
self
.
rewrite_content_links
,
}
self
.
child_descriptor
=
descriptors
[
version_index
](
self
.
system
)
self
.
child_descriptor
=
descriptors
[
version_index
](
self
.
system
)
self
.
child_definition
=
CombinedOpenEndedV1Descriptor
.
definition_from_xml
(
etree
.
fromstring
(
definition
[
'xml_string'
]),
self
.
system
)
self
.
child_definition
=
CombinedOpenEndedV1Descriptor
.
definition_from_xml
(
etree
.
fromstring
(
definition
[
'xml_string'
]),
self
.
system
)
self
.
child_module
=
modules
[
version_index
](
self
.
system
,
location
,
self
.
child_definition
,
self
.
child_descriptor
,
self
.
child_module
=
modules
[
version_index
](
self
.
system
,
location
,
self
.
child_definition
,
self
.
child_descriptor
,
instance_state
=
json
.
dumps
(
instance_state
),
metadata
=
self
.
metadata
)
instance_state
=
json
.
dumps
(
instance_state
),
metadata
=
self
.
metadata
,
static_data
=
static_data
)
def
get_html
(
self
):
def
get_html
(
self
):
return
self
.
child_module
.
get_html
()
return
self
.
child_module
.
get_html
()
...
...
common/lib/xmodule/xmodule/combined_open_ended_modulev1.py
View file @
1d3f8f06
...
@@ -98,7 +98,7 @@ class CombinedOpenEndedV1Module():
...
@@ -98,7 +98,7 @@ class CombinedOpenEndedV1Module():
css
=
{
'scss'
:
[
resource_string
(
__name__
,
'css/combinedopenended/display.scss'
)]}
css
=
{
'scss'
:
[
resource_string
(
__name__
,
'css/combinedopenended/display.scss'
)]}
def
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
def
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
=
None
,
shared_state
=
None
,
metadata
=
None
,
**
kwargs
):
instance_state
=
None
,
shared_state
=
None
,
metadata
=
None
,
static_data
=
None
,
**
kwargs
):
"""
"""
Definition file should have one or many task blocks, a rubric block, and a prompt block:
Definition file should have one or many task blocks, a rubric block, and a prompt block:
...
@@ -136,7 +136,9 @@ class CombinedOpenEndedV1Module():
...
@@ -136,7 +136,9 @@ class CombinedOpenEndedV1Module():
"""
"""
self
.
metadata
=
metadata
self
.
metadata
=
metadata
self
.
display_name
=
metadata
[
'display_name'
]
self
.
display_name
=
metadata
.
get
(
'display_name'
,
"Open Ended"
)
self
.
rewrite_content_links
=
static_data
[
'rewrite_content_links'
]
# Load instance state
# Load instance state
if
instance_state
is
not
None
:
if
instance_state
is
not
None
:
...
@@ -188,6 +190,7 @@ class CombinedOpenEndedV1Module():
...
@@ -188,6 +190,7 @@ class CombinedOpenEndedV1Module():
}
}
self
.
task_xml
=
definition
[
'task_xml'
]
self
.
task_xml
=
definition
[
'task_xml'
]
self
.
location
=
location
self
.
setup_next_task
()
self
.
setup_next_task
()
def
get_tag_name
(
self
,
xml
):
def
get_tag_name
(
self
,
xml
):
...
...
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