Merge pull request #16560 from edx/sstudent/EDUCATOR-1624
EDUCATOR-1624 logging
This commit is contained in:
@@ -174,7 +174,7 @@ def rescore_problem_module_state(xmodule_instance_args, module_descriptor, stude
|
||||
if not hasattr(instance, 'rescore'):
|
||||
# This should not happen, since it should be already checked in the
|
||||
# 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)
|
||||
|
||||
# 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):
|
||||
entry = InstructorTask.objects.get(id=task_entry.id)
|
||||
output = json.loads(entry.task_output)
|
||||
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)
|
||||
|
||||
def test_rescoring_unaccessable(self):
|
||||
|
||||
Reference in New Issue
Block a user