Minor cleanup

This commit is contained in:
Diana Huang
2013-02-07 10:08:34 -05:00
parent 12ff015bff
commit cab9bfcd55
2 changed files with 5 additions and 2 deletions

View File

@@ -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

View File

@@ -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: