Commit Graph

201 Commits

Author SHA1 Message Date
sarina
1e3074a3f9 docs: Update edx.rtd.io links to docs.openedx.org 2025-04-02 12:10:56 -04:00
Usama Sadiq
b6828cecaa fix: enable pylint warnings (#36195)
* fix: enable pylint warnings
2025-01-30 17:15:33 +05:00
Kyle McCormick
15caa9746f refactor: Completely remove Blockstore (#34739)
Blockstore and all of its (experimental) functionality has been replaced with
openedx-learning, aka "Learning Core". This commit uninstalls the now-unused
openedx-blockstore package and removes all dangling references to it.

Note: This also removes the `copy_library_from_v1_to_v2` management command,
which has been broken ever since we switched from Blockstore to Learning Core.

Part of this DEPR: https://github.com/openedx/public-engineering/issues/238
2024-05-13 09:48:18 -04:00
Usama Sadiq
7710e60328 fix: fix middleware get_response parameter deprecation warning (#33067) 2023-08-22 15:52:30 +05:00
Braden MacDonald
9b9b88df52 chore: remove some usages of six (Python2 compat) (#32554)
* get rid of six.text_type(s)
* get rid of six.b()
* get rid of six.string_types
* get rid of six.PY2/six.PY3
* get rid of six.iteritems() and six.viewvalues()
2023-07-17 12:18:43 -07:00
Tim McCormack
197fef9c2b docs: Various cleanup of outdated comments and docstrings (#31754)
- Remove pylint warning suppression from SHAKE-128 hexdigest calls; these
  are no longer needed as of astroid 2.12.12. For background, see issue
  <https://github.com/PyCQA/pylint/issues/4039>. Also, correct a comment
  that referred to SHAKE-256 instead of SHAKE-128.
- Replace "released" with "beta" in several places where there was a copy
  & paste error in dark_lang. Add mention of `beta_lang` to a docstring
  where it was omitted.
- Remove comment regarding Mongo startup; the code it referred to has since
  been removed.
- Fix typos.
2023-02-14 18:11:57 +00:00
Syed Sajjad Hussain Shah
45d62226c1 fix: rename events and remove from_email property [VAN-1060] (#30911) 2022-08-29 14:59:13 +05:00
Syed Sajjad Hussain Shah
1bb6c3ed0d fix: fire event only if the from_email property is true [VAN-1060] (#30904) 2022-08-29 09:54:51 +05:00
Zainab Amir
faf33bf32e feat: add optimizely experiment (#30880)
Added two events to measure optimizely experiment metrics:
- user_goal_setting_click
- user_start_course_click

VAN-1052
2022-08-23 15:33:54 +05:00
Jawayria
7f5b4a6a47 chore: removed 'wrong-import-order' from disabled imports (#29365)
* chore: removed 'wrong-import-order' from disabled imports
2022-01-06 19:14:51 +05:00
Jawayria
833ce7d586 Merge pull request #29570 from edx/jawayria/fix-url-common
fix: fixed RemovedInDjango40 warnings in common
2021-12-15 13:55:37 +05:00
Jawayria
bd5e00b725 fix: fixed RemovedInDjango40 warnings in common 2021-12-14 19:55:01 +05:00
Jawayria
ce26c8476d chore: Applied lint-amnesty on common/djangoapps 2021-12-13 20:53:36 +05:00
brianhw
b3b3ef98b2 feat: add courserun_key property to GA event transformer. (#28761)
The GA transformer adds the context.course_id property of a tracking
log event to the event transmitted automatically to Segment in the
"label" property, so GA can use it.  This adds it also to the
"courserun_key" property, so that regular users of Segment events can
also query it in a more consistently-named property.  However, it does
so only if it is a valid CourseKey.

For DENG-997.

Add CourseKey parsing.
2021-10-19 16:40:30 -04:00
Usama Sadiq
484cd536e2 fix: Fixed new pylint warnings (#28724) 2021-09-23 17:54:04 +05:00
Ken Clary
8c8450f6dc feat: add explicit courserun_key parameter to /event endpoint
We add 'courserun_key' (aka "course_id" though that's technically a
misnomer) as an optional parameter to the /event endpoint url. If it
is not present, it will still be parsed out of the url, if the url is
of the right format.

Additionally, Logger.log() in js adds this parameter to its /event
call, pulling it from the $$course_id global.

This provides opportunity for MFEs to (separately) provide the key
without concern about url parsing.

TNL-7752
2021-08-11 14:40:25 -04:00
Manjinder Singh
f7c5a109d4 Revert "feat: add explicit courserun_key parameter to /event endpoint" (#28410) 2021-08-05 18:05:20 -04:00
Ken Clary
bbb14a2c6a feat: add explicit courserun_key parameter to /event endpoint
We add 'courserun_key' (aka "course_id" though that's technically a
misnomer) as an optional parameter to the /event endpoint url. If it
is not present, it will still be parsed out of the url, if the url is
of the right format.

Additionally, Logger.log() in js adds this parameter to its /event
call, pulling it from the $$course_id global.

This provides opportunity for MFEs to (separately) provide the key
without concern about url parsing.

TNL-7752
2021-08-04 22:47:43 -04:00
Ken Clary
13b6ed901a feat: add explicit courserun_key parameter to /event endpoint
We add 'courserun_key' (aka "course_id" though that's technically a
misnomer) as an optional parameter to the /event endpoint url. If it
is not present, it will still be parsed out of the url, if the url is
of the right format.

Additionally, Logger.log() in js adds this parameter to its /event
call, pulling it from the $$course_id global.

This provides opportunity for MFEs to (separately) provide the key
without concern about url parsing.

TNL-7752
2021-07-30 10:25:56 -04:00
RehanAziz
e0efd9bbf2 feat: Added enterprise uuid in event context for enterprise enrolment events 2021-07-08 10:58:24 +05:00
Usama Sadiq
4f4be6538a BOM-2477: pylint warnings lint-amnesty (#27585) 2021-05-11 17:22:40 +05:00
Usama Sadiq
f2f9e36d6c refactor: pyupgrade second iteration (#27454) 2021-05-10 13:50:19 +05:00
Usama Sadiq
2409ea22be refactor: pyupgrade second iteration (#27453) 2021-05-10 13:48:34 +05:00
Stu Young
5107aa41e9 DENG-803: add traits to segment context for enrollment activated events (#26842)
add traits to segment context for enrollment activated events
2021-03-16 14:28:22 -04:00
Jawayria
e4cff58bed BOM-2351: Removed unused imports from common/djangoapps/{track, util} 2021-02-23 19:31:57 +05:00
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
Tim McCormack
e0e03dec5f Use more appropriate hash when making tracking ID; document SECRET_KEY use (#26134)
- Make it easier to rotate `SECRET_KEY` by documenting this usage
  for both sensitivity and rotation process. (ARCHBOM-1676).
- Just use a hash of the secret rather than HMAC + MD5. We're not
  authenticating a message, so HMAC isn't really needed -- it just needs
  to be unique, deterministic, and irreversible. SHAKE allows generation
  of an arbitrary length hash without needing to truncate.

Also, rename tracking session ID generator for clarity -- there's no
encryption happening here.

Add additional test for existing claim of uniqueness.
2021-01-27 14:13:42 +00: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
Aarif
9e34cb3df9 Removed deprecated future imports (#24295) 2020-06-28 23:40:03 +05: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
27480cdd2f Removed deprecated future imports 2020-06-23 18:51:43 +05:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Luis Moreno
ae0c051e9e Use authsource instead of auth_source for compatibilities with pymongo 2020-03-02 13:31:07 -05:00
Diana Huang
67ecee91e4 Drop tracking log table. 2020-02-11 09:34:26 -05:00
Diana Huang
1f45181c14 Remove ENABLE_SQL_TRACKING_LOGS and all associated code. 2020-02-05 14:42:33 -05:00
Diana Huang
742868c2da Remove the tracking django backend and the TrackingLog tables. 2020-02-04 14:24:56 -05:00
Aarif
97d327feeb BOM-1121
Old style mixin compatibility with django2.2
2020-01-30 16:36:02 +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
Manjinder Singh
a40f1d9bd6 BOM-933: Fix type mismatches in various migrations 2 (#22115)
* Fix type mismatches in track migrations

* Fix type mismatches in oauth_dispatch

* Fix type mismatches in badges migrations

* fix type mismatch in contentserver migrations

* Fix type mismatches in mobile_api migrations

* fix type mismatch in crawlers migrations

* fix type mismatch in dark_lang migrations

* fix type mismatch in branding  migrations
2019-10-23 13:04:36 -04:00