Commit Graph

52 Commits

Author SHA1 Message Date
M. Zulqarnain
42fc6aef03 Upgrade django-ipware (#24827) 2021-02-23 18:14:17 +05:00
Aarif
a1406cddf2 replaced unittest assertions pytest assertions (#26528) 2021-02-18 18:09:45 +05:00
Jawayria
dd99f8e02d Resolved quality errors 2021-02-03 17:05:12 +05:00
Jawayria
6be60b2fcc Resolved quality failures 2021-02-03 13:13:00 +05:00
Jawayria
62bc555817 Applied pylint-amnesty to track 2021-02-03 13:10:42 +05:00
Robert Raposa
186f5fbce2 track: catch unhandled exceptions and add monitoring
Add the following monitoring custom attributes:
- segment_event_name
- segment_event_source
- segment_unexpected_context
- segment_unexpected_data

Also, this explicitly raises a validation error whenever context is a
string instead of throwing a vague TypeError.

Related to LEARNER-8034
2020-11-18 21:45:00 -05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
brianhw
89169443ad Handle more kinds of bad data in segment events. (#25506) 2020-11-03 15:04:05 -05:00
stvn
5eaa532046 Fix segment_context key error
This is one of the frequent TNL errors.
2020-07-20 17:26:38 -07:00
Danial Malik
c962423bbc Replace track calls with eventtracking in task_track and server_track (#24282)
* Replace track calls with eventtracking in task_track and server_track

* Making  events compatible with events emitted via track app

* Fixed broken tests and quality violation

* Removed useless changes in shim. using  in  to have  and  keys in event context

Co-authored-by: zia.fazal@arbisoft.com <zia.fazal@arbisoft.com>
2020-06-26 13:49:16 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Diana Huang
742868c2da Remove the tracking django backend and the TrackingLog tables. 2020-02-04 14:24:56 -05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Jeremy Bowman
42cfb3ec8f Fix last common/djangoapps/track test 2019-09-18 12:08:36 -04:00
Nimisha Asthagiri
d564af8301 Fix for decode errors in bulk_email.tests.test_course_optout.py 2019-08-19 14:26:48 -04:00
Anthony Wee
a0bb7e572d INCR-125: Run python-modernize on common/djangoapps/track/views and migrations (#20425)
* INCR-125: Run python-modernize on common/djangoapps/track/views and migrations

* isort
2019-05-07 14:26:57 -04:00
Robert Raposa
e8d60611de Add user_id for username in event data.
In certain use cases, a caller may have the username and not the
user_id. In these cases, we add the user_id since events have
standardized on using the user_id as the unique id of a user.

ARCH-472
2019-03-06 17:06:53 -05:00
Michael Youngstrom
4bbd1dee0b Remove shards from commonlib-unit tests 2019-02-12 14:28:35 -05:00
Awais Jibran
ddd69db7cf Handle string datetime with datetime parser. 2018-12-11 13:24:10 -05:00
Feanil Patel
4e13a1c2dd Revert "upgrade gunicorn 19.0 and make upgrade"
This reverts commit f6c215ae5b.
2018-10-31 15:01:00 -04:00
nadeemshahzad
f6c215ae5b upgrade gunicorn 19.0 and make upgrade 2018-10-30 10:42:58 +00:00
Jeremy Bowman
4241249119 TE-2524 Stop using nose.plugins 2018-07-30 21:11:05 -04:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00
Kyle McCormick
fade4a10af Implement event for forum thread views
EDUCATOR-341
2017-07-11 12:42:49 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Diana Huang
e12a704cea Add new course dates fragment.
Also add it to the course home page.
2017-05-04 20:53:42 -04:00
Calen Pennington
bc20a37c2b Simplify how shards are selected in CI 2016-08-03 16:23:02 -04:00
Ben Patterson
b9558a90f1 Create a 3rd explicit shard for unit tests.
More accurately, this creates a 4th shard because the
last shard is always the default.
2016-04-28 10:09:32 -04:00
J. Clifford Dyer
001874c42e Update seq_* to edx.ui.lms.sequence.* format
seq_next, seq_prev, and seq_goto events are all renamed, and maintain
legacy compatibility.

This PR also introduces new EventTransformer framework to shim events
based on name prefix.

MA-2221
2016-04-22 13:38:41 -04:00
Nimisha Asthagiri
a5574792fb Fix mobile Warning errors in tracking logs. 2016-02-09 13:22:15 -05:00
Syed Hassan Raza
de91ceaae2 Fix HTTP_USER_AGENT latin1 characters 2016-01-20 18:40:09 +05:00
Ned Batchelder
43ac38aa87 Add autospec to all mocks 2015-12-09 09:44:22 -05:00
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00
Bill DeRusha
40a8608b0b Upgrade IP parsing in tracker middleware 2015-10-08 13:48:53 -04:00
Bill DeRusha
c721ff5a82 Replace SEGMENT_IO_LMS & SEGMENT_IO_LMS_KEY with single key SEGMENT_KEY 2015-09-24 11:49:03 -04:00
Sarina Canelake
ba8fd1c21d Eliminate instances of unused-import Pylint violation 2015-07-13 17:33:25 -04:00
Sarina Canelake
e53b9c83d9 Use Django 1.4 @ensure_csrf_cookie method PLAT-664 2015-06-06 08:48:36 -04:00
Gabe Mulley
4a8b0c5ef5 Make user_track use eventtracking 2015-05-06 20:57:46 -04:00
Ned Batchelder
7d799e34f3 Remove unused imports 2015-03-17 07:10:31 -04:00
christopher lee
bb5fbda873 MA-272 Updated analytics shim for mobile video events
Shim has been updated to handle currents builds of the android and iOS
apps which are not returning the correct semantics/events. Shim now
includes the seek event.
2015-03-09 15:01:30 -04:00
Piotr Mitros
cf719a40ba Add referer and accept_language to tracking logs
3 line patch, together with a world of pain due to buggy code, broken abstractions in tests, etc.
2015-02-11 13:35:27 -05:00
Nimisha Asthagiri
ad7a67da2b Update segment.io shim for mobile event syntax change. 2014-12-19 12:39:39 -05:00
Nimisha Asthagiri
a6003991a5 MA-157 Mobile analytics end-to-end.
Move app-generated context back into properties.
Ignore BI events through segment's webhook.
Ignore events without Data in Properties.
2014-12-09 18:44:06 -05:00
Nimisha Asthagiri
07d50ba7a1 MA-90 Update Analytics Shim to match new mobile requirements. 2014-11-13 18:18:57 -05:00
Gabe Mulley
821c97fbb4 Implement shim for mobile video events.
This PR addresses the following issues:

1) All requests return a 200 OK unless there is an authorization failure. This is deliberate in case the secret key is compromised.
2) Push all of the nasty logic necessary to generate compatible video events into the LMS instead of trying to do that mapping on the mobile devices.
3) Stop using the deprecated "action" field in the segment.io event. According to their support team this field should not be used anymore and is just around for backwards compatibility reasons.

Fixes: AN-3818
2014-11-03 14:12:07 -05:00
Gabe Mulley
5643101ad1 Small changes to the segment.io event handler 2014-10-09 13:25:20 -04:00