fix: removed cohorts filter from reported notifications (#34369)
This commit is contained in:
@@ -306,10 +306,9 @@ class DiscussionNotificationSender:
|
||||
'content_type': content_type,
|
||||
'content': thread_body
|
||||
}
|
||||
audience_filters = self._create_cohort_course_audience()
|
||||
audience_filters['discussion_roles'] = [
|
||||
audience_filters = {'discussion_roles': [
|
||||
FORUM_ROLE_ADMINISTRATOR, FORUM_ROLE_MODERATOR, FORUM_ROLE_COMMUNITY_TA
|
||||
]
|
||||
]}
|
||||
self._send_course_wide_notification("content_reported", audience_filters, context)
|
||||
|
||||
|
||||
|
||||
@@ -54,6 +54,8 @@ class TestDiscussionNotificationSender(unittest.TestCase):
|
||||
self.assertEqual(audience_filters, {
|
||||
'discussion_roles': ['Administrator', 'Moderator', 'Community TA']
|
||||
})
|
||||
self.assertEqual(len(audience_filters), 1)
|
||||
self.assertEqual(list(audience_filters.keys()), ['discussion_roles'])
|
||||
|
||||
def test_send_reported_content_notification_for_response(self, mock_send_notification, mock_create_audience):
|
||||
"""
|
||||
@@ -563,7 +563,7 @@ class TestResponseEndorsedNotifications(DiscussionAPIViewTestMixin, ModuleStoreT
|
||||
|
||||
def test_response_endorsed_notifications(self):
|
||||
"""
|
||||
Tests nresponse endorsed notifications
|
||||
Tests response endorsed notifications
|
||||
"""
|
||||
|
||||
thread = ThreadMock(thread_id=1, creator=self.user_1, title='test thread')
|
||||
|
||||
Reference in New Issue
Block a user