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
8e2585e3
Commit
8e2585e3
authored
Jun 29, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't dump inherited metadata when exporting xml
parent
0c84f8da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
common/lib/xmodule/x_module.py
+2
-0
common/lib/xmodule/xml_module.py
+2
-2
No files found.
common/lib/xmodule/x_module.py
View file @
8e2585e3
...
...
@@ -253,6 +253,7 @@ class XModuleDescriptor(Plugin):
self
.
shared_state_key
=
kwargs
.
get
(
'shared_state_key'
)
self
.
_child_instances
=
None
self
.
_inherited_metadata
=
set
()
def
inherit_metadata
(
self
,
metadata
):
"""
...
...
@@ -264,6 +265,7 @@ class XModuleDescriptor(Plugin):
# in self.inheritable_metadata and aren't already set in metadata
for
attr
in
self
.
inheritable_metadata
:
if
attr
not
in
self
.
metadata
and
attr
in
metadata
:
self
.
_inherited_metadata
.
add
(
attr
)
self
.
metadata
[
attr
]
=
metadata
[
attr
]
def
get_children
(
self
):
...
...
common/lib/xmodule/xml_module.py
View file @
8e2585e3
...
...
@@ -68,10 +68,10 @@ class XmlDescriptor(XModuleDescriptor):
xml_object
.
tag
=
self
.
type
for
attr
in
(
'format'
,
'graceperiod'
,
'showanswer'
,
'rerandomize'
,
'due'
):
if
attr
in
self
.
metadata
:
if
attr
in
self
.
metadata
and
attr
not
in
self
.
_inherited_metadata
:
xml_object
.
set
(
attr
,
self
.
metadata
[
attr
])
if
'graded'
in
self
.
metadata
:
if
'graded'
in
self
.
metadata
and
'graded'
not
in
self
.
_inherited_metadata
:
xml_object
.
set
(
'graded'
,
str
(
self
.
metadata
[
'graded'
])
.
lower
())
if
'display_name'
in
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