Merge branch 'release'

Conflicts:
	cms/djangoapps/contentstore/tests/test_course_listing.py
	common/djangoapps/student/management/commands/create_random_users.py
	common/lib/xmodule/xmodule/modulestore/loc_mapper_store.py
	lms/djangoapps/bulk_email/forms.py
	lms/djangoapps/courseware/tests/test_video_handlers.py
	lms/djangoapps/courseware/views.py
	lms/djangoapps/instructor/management/commands/openended_post.py
	lms/djangoapps/instructor/management/commands/openended_stats.py
	lms/djangoapps/instructor/tests/test_spoc_gradebook.py
This commit is contained in:
Greg Price
2014-06-02 14:54:17 -04:00
268 changed files with 112306 additions and 12868 deletions

View File

@@ -209,7 +209,7 @@ class CachingDescriptorSystem(MakoDescriptorSystem):
module.save()
return module
except:
log.warning("Failed to load descriptor", exc_info=True)
log.warning("Failed to load descriptor from %s", json_data, exc_info=True)
return ErrorDescriptor.from_json(
json_data,
self,
@@ -558,7 +558,7 @@ class MongoModuleStore(ModuleStoreWriteBase):
'''
Returns a list of course descriptors.
'''
return sum(
base_list = sum(
[
self._load_items(
SlashSeparatedCourseKey(course['_id']['org'], course['_id']['course'], course['_id']['name']),
@@ -575,6 +575,7 @@ class MongoModuleStore(ModuleStoreWriteBase):
],
[]
)
return [course for course in base_list if not isinstance(course, ErrorDescriptor)]
def _find_one(self, location):
'''Look for a given location in the collection. If revision is not

View File

@@ -70,6 +70,7 @@ from bson.objectid import ObjectId
from xmodule.modulestore.split_mongo.mongo_connection import MongoConnection
from xblock.core import XBlock
from xmodule.modulestore.loc_mapper_store import LocMapperStore
from xmodule.error_module import ErrorDescriptor
log = logging.getLogger(__name__)
#==============================================================================
@@ -331,7 +332,9 @@ class SplitMongoModuleStore(ModuleStoreWriteBase):
'structure': entry,
}
root = entry['root']
result.extend(self._load_items(envelope, [root], 0, lazy=True))
course_list = self._load_items(envelope, [root], 0, lazy=True)
if not isinstance(course_list[0], ErrorDescriptor):
result.append(course_list[0])
return result
def get_course(self, course_id, depth=None):