Commit cab9bfcd by Diana Huang

Minor cleanup

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