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
8d765567
Commit
8d765567
authored
Feb 21, 2013
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1531 from MITx/fix/cdodge/serializing-ints-as-empty-strings
Fix/cdodge/serializing ints as empty strings
parents
76c40074
bc1ee3db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
cms/djangoapps/contentstore/tests/test_contentstore.py
+12
-0
common/lib/xmodule/xmodule/xml_module.py
+1
-2
common/test/data/simple/course.xml
+1
-1
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
8d765567
...
@@ -422,6 +422,18 @@ class ContentStoreTest(ModuleStoreTestCase):
...
@@ -422,6 +422,18 @@ class ContentStoreTest(ModuleStoreTestCase):
self
.
assertIn
(
'markdown'
,
problem
.
metadata
,
"markdown is missing from metadata"
)
self
.
assertIn
(
'markdown'
,
problem
.
metadata
,
"markdown is missing from metadata"
)
self
.
assertNotIn
(
'markdown'
,
problem
.
editable_metadata_fields
,
"Markdown slipped into the editable metadata fields"
)
self
.
assertNotIn
(
'markdown'
,
problem
.
editable_metadata_fields
,
"Markdown slipped into the editable metadata fields"
)
def
test_import_metadata_with_attempts_empty_string
(
self
):
import_from_xml
(
modulestore
(),
'common/test/data/'
,
[
'simple'
])
ms
=
modulestore
(
'direct'
)
did_load_item
=
False
try
:
ms
.
get_item
(
Location
([
'i4x'
,
'edX'
,
'simple'
,
'problem'
,
'ps01-simple'
,
None
]))
did_load_item
=
True
except
ItemNotFoundError
:
pass
# make sure we found the item (e.g. it didn't error while loading)
self
.
assertTrue
(
did_load_item
)
def
test_metadata_inheritance
(
self
):
def
test_metadata_inheritance
(
self
):
import_from_xml
(
modulestore
(),
'common/test/data/'
,
[
'full'
])
import_from_xml
(
modulestore
(),
'common/test/data/'
,
[
'full'
])
...
...
common/lib/xmodule/xmodule/xml_module.py
View file @
8d765567
...
@@ -128,8 +128,7 @@ class XmlDescriptor(XModuleDescriptor):
...
@@ -128,8 +128,7 @@ class XmlDescriptor(XModuleDescriptor):
'graded'
:
bool_map
,
'graded'
:
bool_map
,
'hide_progress_tab'
:
bool_map
,
'hide_progress_tab'
:
bool_map
,
'allow_anonymous'
:
bool_map
,
'allow_anonymous'
:
bool_map
,
'allow_anonymous_to_peers'
:
bool_map
,
'allow_anonymous_to_peers'
:
bool_map
'weight'
:
int_map
}
}
...
...
common/test/data/simple/course.xml
View file @
8d765567
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<chapter
name=
"Chapter 2"
>
<chapter
name=
"Chapter 2"
>
<section
name=
"Problem Set 1"
>
<section
name=
"Problem Set 1"
>
<sequential>
<sequential>
<problem
type=
"lecture"
showanswer=
"attempted"
rerandomize=
"true"
display_name=
"A simple coding problem"
name=
"Simple coding problem"
filename=
"ps01-simple"
/>
<problem
type=
"lecture"
showanswer=
"attempted"
rerandomize=
"true"
display_name=
"A simple coding problem"
name=
"Simple coding problem"
filename=
"ps01-simple"
url_name=
"ps01-simple"
weight=
""
attempts=
""
/>
</sequential>
</sequential>
</section>
</section>
<video
name=
"Lost Video"
youtube=
"1.0:TBvX7HzxexQ"
/>
<video
name=
"Lost Video"
youtube=
"1.0:TBvX7HzxexQ"
/>
...
...
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