Commit 0209c883 by Calen Pennington

Remove trailing whitespace

parent 94d3ccf6
...@@ -303,6 +303,7 @@ class MongoModuleStore(ModuleStoreBase): ...@@ -303,6 +303,7 @@ class MongoModuleStore(ModuleStoreBase):
# this is likely a leaf node, so let's record what metadata we need to inherit # this is likely a leaf node, so let's record what metadata we need to inherit
metadata_to_inherit[child] = my_metadata metadata_to_inherit[child] = my_metadata
if root is not None: if root is not None:
_compute_inherited_metadata(root) _compute_inherited_metadata(root)
...@@ -330,7 +331,7 @@ class MongoModuleStore(ModuleStoreBase): ...@@ -330,7 +331,7 @@ class MongoModuleStore(ModuleStoreBase):
return tree return tree
def clear_cached_metadata_inheritance_tree(self, location): def clear_cached_metadata_inheritance_tree(self, location):
key_name = '{0}/{1}'.format(location.org, location.course) key_name = '{0}/{1}'.format(location.org, location.course)
if self.metadata_inheritance_cache is not None: if self.metadata_inheritance_cache is not None:
self.metadata_inheritance_cache.delete(key_name) self.metadata_inheritance_cache.delete(key_name)
...@@ -611,7 +612,7 @@ class MongoModuleStore(ModuleStoreBase): ...@@ -611,7 +612,7 @@ class MongoModuleStore(ModuleStoreBase):
self._update_single_item(location, {'metadata': metadata}) self._update_single_item(location, {'metadata': metadata})
# recompute (and update) the metadata inheritance tree which is cached # recompute (and update) the metadata inheritance tree which is cached
self.get_cached_metadata_inheritance_tree(loc, force_refresh = True) self.get_cached_metadata_inheritance_tree(loc, force_refresh = True)
def delete_item(self, location): def delete_item(self, location):
""" """
...@@ -631,7 +632,7 @@ class MongoModuleStore(ModuleStoreBase): ...@@ -631,7 +632,7 @@ class MongoModuleStore(ModuleStoreBase):
self.collection.remove({'_id': Location(location).dict()}) self.collection.remove({'_id': Location(location).dict()})
# recompute (and update) the metadata inheritance tree which is cached # recompute (and update) the metadata inheritance tree which is cached
self.get_cached_metadata_inheritance_tree(Location(location), force_refresh = True) self.get_cached_metadata_inheritance_tree(Location(location), force_refresh = True)
def get_parent_locations(self, location, course_id): def get_parent_locations(self, location, course_id):
......
...@@ -159,6 +159,7 @@ def grade(student, request, course, model_data_cache=None, keep_raw_scores=False ...@@ -159,6 +159,7 @@ def grade(student, request, course, model_data_cache=None, keep_raw_scores=False
# If we haven't seen a single problem in the section, we don't have to grade it at all! We can assume 0% # If we haven't seen a single problem in the section, we don't have to grade it at all! We can assume 0%
for moduledescriptor in section['xmoduledescriptors']: for moduledescriptor in section['xmoduledescriptors']:
# Create a fake key to pull out a StudentModule object from the ModelDataCache # Create a fake key to pull out a StudentModule object from the ModelDataCache
key = LmsKeyValueStore.Key( key = LmsKeyValueStore.Key(
Scope.student_state, Scope.student_state,
student.id, student.id,
......
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