From 147ca0bcf19a9cf6664192c317a8a1d4fc75d10c Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Wed, 2 Aug 2017 14:07:26 -0400 Subject: [PATCH] Send signal requires sender argument --- lms/djangoapps/grades/services.py | 2 ++ lms/djangoapps/grades/tests/test_services.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lms/djangoapps/grades/services.py b/lms/djangoapps/grades/services.py index 533776ba41..475e29c860 100644 --- a/lms/djangoapps/grades/services.py +++ b/lms/djangoapps/grades/services.py @@ -96,6 +96,7 @@ class GradesService(object): # Signal will trigger subsection recalculation which will call PersistentSubsectionGrade.update_or_create_grade # which will use the above override to update the grade before writing to the table. SUBSECTION_OVERRIDE_CHANGED.send( + sender=None, user_id=user_id, course_id=unicode(course_key), usage_id=unicode(usage_key), @@ -131,6 +132,7 @@ class GradesService(object): # which will no longer use the above deleted override, and instead return the grade to the original score from # the actual problem responses before writing to the table. SUBSECTION_OVERRIDE_CHANGED.send( + sender=None, user_id=user_id, course_id=unicode(course_key), usage_id=unicode(usage_key), diff --git a/lms/djangoapps/grades/tests/test_services.py b/lms/djangoapps/grades/tests/test_services.py index ec6f4d61d2..254f688b08 100644 --- a/lms/djangoapps/grades/tests/test_services.py +++ b/lms/djangoapps/grades/tests/test_services.py @@ -179,6 +179,7 @@ class GradesServiceTests(ModuleStoreTestCase): self.assertEqual( self.mock_signal.call_args, call( + sender=None, user_id=self.user.id, course_id=unicode(self.course.id), usage_id=unicode(self.subsection.location), @@ -205,6 +206,7 @@ class GradesServiceTests(ModuleStoreTestCase): self.assertEqual( self.mock_signal.call_args, call( + sender=None, user_id=self.user.id, course_id=unicode(self.course.id), usage_id=unicode(self.subsection.location),