Change get_courses default branch to draft.

We need to figure out how apps configure what default they want or ensure they get the one they want
This commit is contained in:
Don Mitchell
2014-03-03 13:15:48 -05:00
parent aab5e0441b
commit dcc6f54409
2 changed files with 2 additions and 4 deletions

View File

@@ -274,7 +274,7 @@ class SplitMongoModuleStore(ModuleStoreWriteBase):
}
return envelope
def get_courses(self, branch='published', qualifiers=None):
def get_courses(self, branch='draft', qualifiers=None):
'''
Returns a list of course descriptors matching any given qualifiers.
@@ -284,7 +284,7 @@ class SplitMongoModuleStore(ModuleStoreWriteBase):
Note, this is to find the current head of the named branch type
(e.g., 'draft'). To get specific versions via guid use get_course.
:param branch: the branch for which to return courses. Default value is 'published'.
:param branch: the branch for which to return courses. Default value is 'draft'.
:param qualifiers: a optional dict restricting which elements should match
'''
if qualifiers is None:

View File

@@ -163,8 +163,6 @@ class SplitModuleCourseTests(SplitModuleTest):
"children")
_verify_published_course(modulestore().get_courses(branch='published'))
# default for branch is 'published'.
_verify_published_course(modulestore().get_courses())
def test_search_qualifiers(self):
# query w/ search criteria