diff --git a/lms/djangoapps/grades/subsection_grade_factory.py b/lms/djangoapps/grades/subsection_grade_factory.py index 67cee7d6f5..5f24c8535d 100644 --- a/lms/djangoapps/grades/subsection_grade_factory.py +++ b/lms/djangoapps/grades/subsection_grade_factory.py @@ -107,8 +107,9 @@ class SubsectionGradeFactory(object): self._update_saved_subsection_grade(subsection.location, grade_model) if settings.FEATURES.get('ENABLE_COURSE_ASSESSMENT_GRADE_CHANGE_SIGNAL'): - COURSE_ASSESSMENT_GRADE_CHANGED.send_robust( + COURSE_ASSESSMENT_GRADE_CHANGED.send( sender=self, + course_id=self.course_data.course_key, user=self.student, subsection_id=calculated_grade.location, subsection_grade=calculated_grade.graded_total.earned diff --git a/lms/djangoapps/grades/tests/test_subsection_grade_factory.py b/lms/djangoapps/grades/tests/test_subsection_grade_factory.py index 9079ba07a8..068bc3948e 100644 --- a/lms/djangoapps/grades/tests/test_subsection_grade_factory.py +++ b/lms/djangoapps/grades/tests/test_subsection_grade_factory.py @@ -57,7 +57,7 @@ class TestSubsectionGradeFactory(ProblemSubmissionTestMixin, GradeTestBase): """ with mock_get_score(1, 2): with patch( - 'openedx.core.djangoapps.signals.signals.COURSE_ASSESSMENT_GRADE_CHANGED.send_robust' + 'openedx.core.djangoapps.signals.signals.COURSE_ASSESSMENT_GRADE_CHANGED.send' ) as mock_update_grades_signal: grade = self.subsection_grade_factory.update(self.sequence) self.assert_grade(grade, 1, 2) diff --git a/openedx/features/enterprise_support/signals.py b/openedx/features/enterprise_support/signals.py index 81b5881c0b..c8f62fee24 100644 --- a/openedx/features/enterprise_support/signals.py +++ b/openedx/features/enterprise_support/signals.py @@ -11,7 +11,10 @@ from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imp from django.db.models.signals import post_save, pre_save from django.dispatch import receiver from enterprise.models import EnterpriseCourseEnrollment, EnterpriseCustomer, EnterpriseCustomerUser -from integrated_channels.integrated_channel.tasks import transmit_single_learner_data, transmit_subsection_learner_data +from integrated_channels.integrated_channel.tasks import ( + transmit_single_learner_data, + transmit_single_subsection_learner_data +) from slumber.exceptions import HttpClientError from lms.djangoapps.email_marketing.tasks import update_user @@ -99,7 +102,7 @@ def handle_enterprise_learner_subsection(sender, user, course_id, subsection_id, 'grade': str(subsection_grade), } - transmit_subsection_learner_data.apply_async(kwargs=kwargs) + transmit_single_subsection_learner_data.apply_async(kwargs=kwargs) @receiver(UNENROLL_DONE) diff --git a/openedx/features/enterprise_support/tests/test_signals.py b/openedx/features/enterprise_support/tests/test_signals.py index 12b1b8ee6d..475f174f37 100644 --- a/openedx/features/enterprise_support/tests/test_signals.py +++ b/openedx/features/enterprise_support/tests/test_signals.py @@ -213,7 +213,7 @@ class EnterpriseSupportSignals(SharedModuleStoreTestCase): Test to assert transmit_subsection_learner_data is called when COURSE_ASSESSMENT_GRADE_CHANGED signal is fired. """ with patch( - 'integrated_channels.integrated_channel.tasks.transmit_subsection_learner_data.apply_async', + 'integrated_channels.integrated_channel.tasks.transmit_single_subsection_learner_data.apply_async', return_value=None ) as mock_task_apply: course_key = CourseKey.from_string(self.course_id)