diff --git a/lms/djangoapps/discussion/tasks.py b/lms/djangoapps/discussion/tasks.py index 1c46efc66c09c8814c4c4774f71e75f5397eb547..2072d36701ccbdeedecffabb705aa6d42dc3de06 100644 --- a/lms/djangoapps/discussion/tasks.py +++ b/lms/djangoapps/discussion/tasks.py @@ -85,7 +85,8 @@ def _track_notification_sent(message, context): 'uuid': unicode(message.uuid), 'send_uuid': unicode(message.send_uuid), 'thread_id': context['thread_id'], - 'thread_created_at': date.deserialize(context['thread_created_at']) + 'thread_created_at': date.deserialize(context['thread_created_at']), + 'nonInteraction': 1, } analytics.track( user_id=context['thread_author_id'], diff --git a/lms/djangoapps/discussion/tests/test_tasks.py b/lms/djangoapps/discussion/tests/test_tasks.py index ff4191c33b78326dbee8e28c67f65970d52ace2f..8164c7b66fae0433ec27db7b62de3dc94dee2fd7 100644 --- a/lms/djangoapps/discussion/tests/test_tasks.py +++ b/lms/djangoapps/discussion/tests/test_tasks.py @@ -298,6 +298,8 @@ class TaskTestCase(ModuleStoreTestCase): for key, entry in test_props.items(): setattr(message, key, entry) + test_props['nonInteraction'] = True + with mock.patch('analytics.track') as mock_analytics_track: _track_notification_sent(message, context) mock_analytics_track.assert_called_once_with( diff --git a/openedx/core/djangoapps/schedules/tasks.py b/openedx/core/djangoapps/schedules/tasks.py index c368773c39276a8bd0e52cc8c4a79be2688696ac..08b11dc46d1f8383e0fcf2cbe1388f827738256a 100644 --- a/openedx/core/djangoapps/schedules/tasks.py +++ b/openedx/core/djangoapps/schedules/tasks.py @@ -216,6 +216,7 @@ def _track_message_sent(site, user, msg): 'language': msg.language, 'uuid': unicode(msg.uuid), 'send_uuid': unicode(msg.send_uuid), + 'nonInteraction': 1, } course_ids = msg.context.get('course_ids', []) properties['num_courses'] = len(course_ids)