Address review comments
This commit is contained in:
@@ -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")
|
||||
self.assertIn("Peer-Graded", html)
|
||||
Reference in New Issue
Block a user