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
18f342c0
Commit
18f342c0
authored
Nov 26, 2013
by
zubair-arbi
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1781 from zubair-arbi/zub/bugfix/std979-displaynameclashes
Fix unique vertical url + add test
parents
2b5b4f4c
829cd7d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
common/lib/xmodule/xmodule/modulestore/xml.py
+1
-1
common/lib/xmodule/xmodule/tests/test_import.py
+10
-0
No files found.
common/lib/xmodule/xmodule/modulestore/xml.py
View file @
18f342c0
...
...
@@ -79,7 +79,7 @@ class ImportSystem(XMLParsingSystem, MakoDescriptorSystem):
# tags that really need unique names--they store (or should store) state.
need_uniq_names
=
(
'problem'
,
'sequential'
,
'video'
,
'course'
,
'chapter'
,
'videosequence'
,
'poll_question'
,
'timelimit'
)
'videosequence'
,
'poll_question'
,
'timelimit'
,
'vertical'
)
attr
=
xml_data
.
attrib
tag
=
xml_data
.
tag
...
...
common/lib/xmodule/xmodule/tests/test_import.py
View file @
18f342c0
...
...
@@ -92,6 +92,16 @@ class ImportTestCase(BaseCourseTestCase):
self
.
assertNotEqual
(
descriptor1
.
location
,
descriptor2
.
location
)
# Check that each vertical gets its very own url_name
bad_xml
=
'''<vertical display_name="abc"><problem url_name="exam1:2013_Spring:abc"/></vertical>'''
bad_xml2
=
'''<vertical display_name="abc"><problem url_name="exam2:2013_Spring:abc"/></vertical>'''
descriptor1
=
system
.
process_xml
(
bad_xml
)
descriptor2
=
system
.
process_xml
(
bad_xml2
)
self
.
assertNotEqual
(
descriptor1
.
location
,
descriptor2
.
location
)
def
test_reimport
(
self
):
'''Make sure an already-exported error xml tag loads properly'''
...
...
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