Commit cab9bfcd by Diana Huang

Minor cleanup

parent 12ff015b
......@@ -10,7 +10,6 @@ import os
import sys
from pkg_resources import resource_string
from timeinfo import TimeInfo
from .capa_module import only_one, ComplexEncoder
from .editing_module import EditingDescriptor
......
......@@ -463,7 +463,8 @@ class PeerGradingModule(XModule):
# grab all peer grading module descriptors for this course
peer_grading_modules = modulestore().get_items(['i4x', self.location.org, self.location.course, 'peergrading', None], self.system.course_id)
peer_grading_modules = modulestore().get_items(
['i4x', self.location.org, self.location.course, 'peergrading', None], self.system.course_id)
# construct a dictionary for fast lookups
module_dict = {}
......@@ -473,6 +474,9 @@ class PeerGradingModule(XModule):
module_dict[linked_location] = module
def _find_corresponding_module_for_location(location):
'''
find the peer grading module that links to the given location
'''
if location in module_dict:
return module_dict[location]
else:
......
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