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
4bf05c02
Commit
4bf05c02
authored
Jan 06, 2017
by
Jesse Shapiro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update comment; update tests
parent
8f5d949d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
+4
-1
common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py
+4
-4
No files found.
common/lib/xmodule/xmodule/modulestore/split_mongo/split.py
View file @
4bf05c02
...
...
@@ -1205,7 +1205,10 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase):
for
block_id
,
block
in
course
.
structure
[
'blocks'
]
.
iteritems
():
# Don't do an in comparison blindly; first check to make sure
# that the name qualifier we're looking at isn't a plain string;
# if it is a string, then it should match exactly.
# if it is a string, then it should match exactly. If it's other
# than a string, we check whether it contains the block ID; this
# is so a list or other iterable can be passed with multiple
# valid qualifiers.
if
isinstance
(
block_name
,
six
.
string_types
):
name_matches
=
block_id
.
id
==
block_name
else
:
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py
View file @
4bf05c02
...
...
@@ -629,7 +629,7 @@ class SplitModuleCourseTests(SplitModuleTest):
course
.
advertised_start
,
"Fall 2013"
,
"advertised_start"
)
self
.
assertEqual
(
len
(
course
.
children
),
3
,
"children"
)
self
.
assertEqual
(
len
(
course
.
children
),
4
,
"children"
)
# check dates and graders--forces loading of descriptor
self
.
assertEqual
(
course
.
edited_by
,
"testassist@edx.org"
)
self
.
assertDictEqual
(
course
.
grade_cutoffs
,
{
"Pass"
:
0.45
})
...
...
@@ -735,7 +735,7 @@ class SplitModuleCourseTests(SplitModuleTest):
self
.
assertEqual
(
len
(
course
.
tabs
),
6
)
self
.
assertEqual
(
course
.
display_name
,
"The Ancient Greek Hero"
)
self
.
assertEqual
(
course
.
advertised_start
,
"Fall 2013"
)
self
.
assertEqual
(
len
(
course
.
children
),
3
)
self
.
assertEqual
(
len
(
course
.
children
),
4
)
# check dates and graders--forces loading of descriptor
self
.
assertEqual
(
course
.
edited_by
,
"testassist@edx.org"
)
self
.
assertDictEqual
(
course
.
grade_cutoffs
,
{
"Pass"
:
0.45
})
...
...
@@ -1103,7 +1103,7 @@ class SplitModuleItemTests(SplitModuleTest):
self
.
assertEqual
(
len
(
block
.
tabs
),
6
,
"wrong number of tabs"
)
self
.
assertEqual
(
block
.
display_name
,
"The Ancient Greek Hero"
)
self
.
assertEqual
(
block
.
advertised_start
,
"Fall 2013"
)
self
.
assertEqual
(
len
(
block
.
children
),
3
)
self
.
assertEqual
(
len
(
block
.
children
),
4
)
# check dates and graders--forces loading of descriptor
self
.
assertEqual
(
block
.
edited_by
,
"testassist@edx.org"
)
self
.
assertDictEqual
(
...
...
@@ -1253,7 +1253,7 @@ class SplitModuleItemTests(SplitModuleTest):
block
=
modulestore
()
.
get_item
(
locator
)
children
=
block
.
get_children
()
expected_ids
=
[
"chapter1"
,
"chapter2"
,
"chapter3"
"chapter1"
,
"chap
"
,
"chap
ter2"
,
"chapter3"
]
for
child
in
children
:
self
.
assertEqual
(
child
.
category
,
"chapter"
)
...
...
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