Unverified Commit 4d0ce28f by sanfordstudent Committed by GitHub

Merge pull request #16560 from edx/sstudent/EDUCATOR-1624

EDUCATOR-1624 logging
parents 7ccc4988 898129b5
...@@ -174,7 +174,7 @@ def rescore_problem_module_state(xmodule_instance_args, module_descriptor, stude ...@@ -174,7 +174,7 @@ def rescore_problem_module_state(xmodule_instance_args, module_descriptor, stude
if not hasattr(instance, 'rescore'): if not hasattr(instance, 'rescore'):
# This should not happen, since it should be already checked in the # This should not happen, since it should be already checked in the
# caller, but check here to be sure. # caller, but check here to be sure.
msg = "Specified problem does not support rescoring." msg = "Specified module {0} of type {1} does not support rescoring.".format(usage_key, instance.__class__)
raise UpdateProblemModuleStateError(msg) raise UpdateProblemModuleStateError(msg)
# We check here to see if the problem has any submissions. If it does not, we don't want to rescore it # We check here to see if the problem has any submissions. If it does not, we don't want to rescore it
......
...@@ -394,7 +394,10 @@ class TestRescoreInstructorTask(TestInstructorTasks): ...@@ -394,7 +394,10 @@ class TestRescoreInstructorTask(TestInstructorTasks):
entry = InstructorTask.objects.get(id=task_entry.id) entry = InstructorTask.objects.get(id=task_entry.id)
output = json.loads(entry.task_output) output = json.loads(entry.task_output)
self.assertEquals(output['exception'], "UpdateProblemModuleStateError") self.assertEquals(output['exception'], "UpdateProblemModuleStateError")
self.assertEquals(output['message'], "Specified problem does not support rescoring.") self.assertEquals(output['message'], "Specified module {0} of type {1} does not support rescoring.".format(
self.location,
mock_instance.__class__,
))
self.assertGreater(len(output['traceback']), 0) self.assertGreater(len(output['traceback']), 0)
def test_rescoring_unaccessable(self): def test_rescoring_unaccessable(self):
......
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