From 8a19f51c472f394f6489bab51a0e16501989ef85 Mon Sep 17 00:00:00 2001 From: Muhammad Kashif Date: Mon, 20 Jul 2020 16:48:13 +0500 Subject: [PATCH 01/11] EDE-698 fix failing tests due to segment changes --- lms/djangoapps/courseware/tests/test_views.py | 1 + lms/djangoapps/discussion/tests/test_tasks.py | 1 + lms/djangoapps/shoppingcart/models.py | 2 +- lms/djangoapps/shoppingcart/tests/test_models.py | 6 ++++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index bda94fcb57e1..717725b2f845 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -2170,6 +2170,7 @@ def test_user_with_passing_grade(self, mock_is_course_passed): 'category': 'certificates', 'label': unicode(self.course.id) }, + send_to_track=True, user=self.student ) mock_tracker.reset_mock() diff --git a/lms/djangoapps/discussion/tests/test_tasks.py b/lms/djangoapps/discussion/tests/test_tasks.py index 4446d6680a97..b51cab24763d 100644 --- a/lms/djangoapps/discussion/tests/test_tasks.py +++ b/lms/djangoapps/discussion/tests/test_tasks.py @@ -329,4 +329,5 @@ def test_track_notification_sent(self, context, test_props): user_id=context['thread_author_id'], event_name='edx.bi.email.sent', properties=test_props, + send_to_track=True ) diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index 71a305ea2000..c497ea64921c 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -529,7 +529,7 @@ def _emit_order_event(self, event_name, orderitems): 'revenue': str(self.total_cost), 'currency': self.currency, 'products': [item.analytics_data() for item in orderitems] - }, send_to_track=True, user=user) + }, send_to_track=True, user=self.user) except Exception: # pylint: disable=broad-except # Capturing all exceptions thrown while tracking analytics events. We do not want diff --git a/lms/djangoapps/shoppingcart/tests/test_models.py b/lms/djangoapps/shoppingcart/tests/test_models.py index 2e69958df453..adf28a09d0f5 100644 --- a/lms/djangoapps/shoppingcart/tests/test_models.py +++ b/lms/djangoapps/shoppingcart/tests/test_models.py @@ -286,9 +286,10 @@ def test_purchase(self): 'price': '40.00', 'id': 1, 'quantity': 1 - } - ] + }, + ], }, + send_to_track=True, user=self.user ) def test_purchase_item_failure(self): @@ -889,6 +890,7 @@ def _assert_refund_tracked(self): } ] }, + send_to_track=True, user=self.user ) def test_existing_enrollment(self): From 9f674f5e2c1f6a894deb01353dfd974d4ce3aec7 Mon Sep 17 00:00:00 2001 From: Maria Andrade Date: Thu, 23 Jul 2020 13:40:31 -0700 Subject: [PATCH 02/11] Remove Dashboard from Navs --- lms/templates/user_dropdown.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/lms/templates/user_dropdown.html b/lms/templates/user_dropdown.html index 43b2948ba97f..be623e8eef7c 100644 --- a/lms/templates/user_dropdown.html +++ b/lms/templates/user_dropdown.html @@ -27,7 +27,6 @@ @@ -53,7 +51,6 @@