diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index a40929a258..7597a2d655 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -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 diff --git a/common/lib/xmodule/xmodule/tests/test_peer_grading.py b/common/lib/xmodule/xmodule/tests/test_peer_grading.py index a81050b306..67ea3a2408 100644 --- a/common/lib/xmodule/xmodule/tests/test_peer_grading.py +++ b/common/lib/xmodule/xmodule/tests/test_peer_grading.py @@ -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