Commit 00050a08 by Vik Paruchuri

Address review comments

parent 640b7fe6
......@@ -519,7 +519,7 @@ class PeerGradingModule(PeerGradingFields, XModule):
def _find_corresponding_module_for_location(location):
"""
Find the peer grading module that links to the given location.
Find the peer grading module that exists at the given location.
"""
try:
return self.descriptor.system.load_item(location)
......@@ -528,7 +528,7 @@ class PeerGradingModule(PeerGradingFields, XModule):
log.error("Problem {0} does not exist in this course.".format(location))
raise
except NoPathToItem:
# The linked problem doesn't exist.
# The linked problem does not have a path to it (ie is in a draft or other strange state).
log.error("Cannot find a path to problem {0} in this course.".format(location))
raise
......
......@@ -175,9 +175,9 @@ class PeerGradingModuleScoredTest(unittest.TestCase, DummyModulestore):
# Ensure that it cannot find any peer grading.
html = peer_grading.peer_grading()
self.assertNotRegexpMatches(html, "Peer-Graded")
self.assertNotIn("Peer-Graded", html)
#Swap for our mock class, which will find peer grading.
# Swap for our mock class, which will find peer grading.
peer_grading.peer_gs = MockPeerGradingServiceProblemList()
html = peer_grading.peer_grading()
self.assertRegexpMatches(html, "Peer-Graded")
\ No newline at end of file
self.assertIn("Peer-Graded", html)
\ No newline at end of file
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