diff --git a/lms/djangoapps/instructor_task/tasks_helper/module_state.py b/lms/djangoapps/instructor_task/tasks_helper/module_state.py index 4cf7faebd8..e4bb470246 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/module_state.py +++ b/lms/djangoapps/instructor_task/tasks_helper/module_state.py @@ -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 diff --git a/lms/djangoapps/instructor_task/tests/test_tasks.py b/lms/djangoapps/instructor_task/tests/test_tasks.py index 79075427c8..5bfd43a09a 100644 --- a/lms/djangoapps/instructor_task/tests/test_tasks.py +++ b/lms/djangoapps/instructor_task/tests/test_tasks.py @@ -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):