Commit 8dca8053 by Nimisha Asthagiri

Fix branch settings.

parent eecff6e0
...@@ -247,7 +247,7 @@ XBLOCK_MIXINS = (LmsBlockMixin, InheritanceMixin, XModuleMixin) ...@@ -247,7 +247,7 @@ XBLOCK_MIXINS = (LmsBlockMixin, InheritanceMixin, XModuleMixin)
XBLOCK_SELECT_FUNCTION = prefer_xmodules XBLOCK_SELECT_FUNCTION = prefer_xmodules
############################ Modulestore Configuration ################################ ############################ Modulestore Configuration ################################
MODULESTORE_BRANCH = 'draft' MODULESTORE_BRANCH = 'draft-preferred'
############################ DJANGO_BUILTINS ################################ ############################ DJANGO_BUILTINS ################################
# Change DEBUG/TEMPLATE_DEBUG in your environment settings files, not here # Change DEBUG/TEMPLATE_DEBUG in your environment settings files, not here
......
...@@ -492,7 +492,7 @@ class SplitMongoModuleStore(ModuleStoreWriteBase): ...@@ -492,7 +492,7 @@ class SplitMongoModuleStore(ModuleStoreWriteBase):
def get_orphans(self, course_key): def get_orphans(self, course_key):
""" """
Return a dict of all of the orphans in the course. Return an array of all of the orphans in the course.
""" """
detached_categories = [name for name, __ in XBlock.load_tagged_classes("detached")] detached_categories = [name for name, __ in XBlock.load_tagged_classes("detached")]
course = self._lookup_course(course_key) course = self._lookup_course(course_key)
...@@ -1298,7 +1298,7 @@ class SplitMongoModuleStore(ModuleStoreWriteBase): ...@@ -1298,7 +1298,7 @@ class SplitMongoModuleStore(ModuleStoreWriteBase):
self._update_head(index_entry, destination_course.branch, destination_structure['_id']) self._update_head(index_entry, destination_course.branch, destination_structure['_id'])
def unpublish(self, location, user_id): def unpublish(self, location, user_id):
published_location = location.replace(branch=ModuleStoreEnum.RevisionOption.published_only) published_location = location.replace(branch=ModuleStoreEnum.BranchName.published)
self.delete_item(published_location, user_id) self.delete_item(published_location, user_id)
def update_course_index(self, updated_index_entry): def update_course_index(self, updated_index_entry):
...@@ -1456,11 +1456,7 @@ class SplitMongoModuleStore(ModuleStoreWriteBase): ...@@ -1456,11 +1456,7 @@ class SplitMongoModuleStore(ModuleStoreWriteBase):
def get_modulestore_type(self, course_key=None): def get_modulestore_type(self, course_key=None):
""" """
Returns an enumeration-like type reflecting the type of this modulestore Returns an enumeration-like type reflecting the type of this modulestore, per ModuleStoreEnum.Type.
The return can be one of:
"xml" (for XML based courses),
"mongo" for old-style MongoDB backed courses,
"split" for new-style split MongoDB backed courses.
Args: Args:
course_key: just for signature compatibility course_key: just for signature compatibility
......
...@@ -475,7 +475,7 @@ XBLOCK_SELECT_FUNCTION = prefer_xmodules ...@@ -475,7 +475,7 @@ XBLOCK_SELECT_FUNCTION = prefer_xmodules
############# ModuleStore Configuration ########## ############# ModuleStore Configuration ##########
MODULESTORE_BRANCH = 'published' MODULESTORE_BRANCH = 'published-only'
CONTENTSTORE = None CONTENTSTORE = None
DOC_STORE_CONFIG = { DOC_STORE_CONFIG = {
'host': 'localhost', 'host': 'localhost',
......
...@@ -109,7 +109,7 @@ STATICFILES_DIRS += [ ...@@ -109,7 +109,7 @@ STATICFILES_DIRS += [
if os.path.isdir(COMMON_TEST_DATA_ROOT / course_dir) if os.path.isdir(COMMON_TEST_DATA_ROOT / course_dir)
] ]
MODULESTORE_BRANCH = 'draft' MODULESTORE_BRANCH = 'draft-preferred'
update_module_store_settings( update_module_store_settings(
MODULESTORE, MODULESTORE,
module_store_options={ module_store_options={
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment