Commit Graph

56 Commits

Author SHA1 Message Date
M. Zulqarnain
16f600910b pyupgrade on lms edxnotes,email_marketing,experiments apps (#26531) 2021-02-22 15:42:32 +05:00
Calen Pennington
64c94174ed fix: Standardize the name of the education field in Segment
The UserProfile fields level_of_education is named education in the identify call we send to segment on registration. This fixes it so that that same field name is used when we send identify events when user profiles change.
2021-02-18 14:25:09 -05:00
M. Zulqarnain
c9c14ee6fc BOM-2279 : Pylint amnesty for edxnotes,email_marketing, and experiments (#26274)
* lint amnesty for edxnotes,email_marketing, and experiments
2021-02-03 18:15:26 +05:00
Calen Pennington
0294f28818 Tag some known instances of sailthru specific code that can be removed as part of AA-607 2021-01-13 15:58:55 -05:00
Calen Pennington
fdac36ec13 Call segment.identify with any changed values when user profile fields change 2021-01-13 10:40:25 -05:00
Régis Behmo
a16cd71046 Start waffle namespace deprecation
By explicitly importing the legacy namespace classes, we make it clear
that we are using soon-to-be-deprecated classes. We will then be able to
start removing the legacy classes, one module at a time.
2020-12-03 16:06:14 +01:00
Saleem Latif
54f59bc3b4 Revert migration update as it creates more issues than it fixes. 2020-11-19 11:25:16 +05:00
Saleem Latif
4a3f9b89fe Do not send email if profile not created, this code path is run as a result UserPreference save signal before profile is created. 2020-11-13 13:13:14 +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
Régis Behmo
4586002956 Import waffle classes from edx_toggles instead of waffle_utils
Those classes were ported to edx_toggles. The imports remain in
waffle_utils.__init__ for backward compatibility.
2020-11-03 19:25:37 +01:00
Calen Pennington
2714da86a4 Always import task packages by absolute paths
This follows the recommendation in the Celery documentation so as to
not confuse automatic task name generation.

Docs: https://docs.celeryproject.org/en/stable/userguide/tasks.html#automatic-naming-and-relative-imports
2020-10-08 14:10:17 -04:00
Calen Pennington
4a120a9e26 Fix failures caused by removing lms/djangoapps from sys.path 2020-09-23 10:05:37 -04:00
Zachary Trabookis
7b3525278e Fix SameSite cookie issue for LTI Provider. EW-449
There was an issue where external LMS system (e.g. Canvas, Blackboard) that used Open edX LTI Provider calls had cookies blocked. This update fixes this issue by defining third-party cookies to have attributes of `Secure=True` and `SameSite=None`.

Details here: https://discuss.openedx.org/t/lti-xblock-and-samesite/759/5

(cherry picked from commit 28479a2966b87b16a25dbc96c19b6f5817d255de)
2020-04-13 17:14:15 +09:30
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
adeelehsan
8e2cdc2dad Used smart_str instead of str 2019-09-26 16:28:03 +05:00
usama sadiq
79d02a1b67 Python3 Update
Added absolute_import
Changed unicode() with six.text_type()
2019-07-11 19:27:15 +05:00
Matthew Piatetsky
6e81c84d8b fix unicode strings in lms/ part 1 2019-02-05 15:15:02 -05:00
Zia Fazal
ae34212528 Fixed bug which stopped new user link with All edX Users sailthru list 2018-12-21 12:11:20 -05:00
bmedx
9b3abd5598 DEPR-8 - Remove retire_mailings endpoint and supporting code 2018-11-27 11:51:03 -05:00
Zia Fazal
9bfe4c3b6c Do not send user info to sailthru when registered from white label site
Added tests to support changes
2018-10-11 17:26:02 +05:00
Nimisha Asthagiri
8cf44283c9 Consolidate user login and authentication code 2018-09-15 03:21:39 -04:00
Uzair Rasheed
0c610749c9 Refactor Code for LEARNER-5257
Course key object was not serializable before sending to celery
task.
2018-07-17 18:20:39 +05:00
uzairr
d84d47f32c Update sailthru audit purchase calls
Currently, there are two purchase calls are occurring for each audit
purchase on sail-thru.To avoid it,code is updated so that a single
call will occur for each purchase.

LEARNER-5257
2018-07-09 01:09:27 +05:00
bmedx
f3a9e508a0 Refactor retirement endpoints to isolate Sailthru and respect boundaries
- Change retire mailings endpoint to use new USER_RETIRE_THIRD_PARTY_MAILINGS signal, currently only used by Sailthru retirement
- Move USER_RETIRE_MAILINGS signal firing to the LMS misc endpoint
- Remove duplicate clearing of UserOrgTags
- Remove LMS imports in openedx/core and update usage to use new USER_RETIRE_LMS_CRITICAL and USER_RETIRE_LMS_MISC signals
- Add testing for new signal handlers and app registration for the LMS survey app
2018-06-27 10:23:49 -04:00
J Eskew
c87ba77233 Revert "Retry upon Sailthru optout timeout." 2018-05-23 10:59:28 -04:00
John Eskew
597e6c66d5 Add backoff module as a new requirement.
Use backoff when calling Sailthru API to retry upon optout timeouts.
2018-05-22 16:03:41 -04:00
bmedx
1e6c6fca5c Fix issues with Sailthru retirement 2018-05-10 13:31:34 -04:00
bmedx
4390773f4b Clean up some warnings to get enough headroom to pass tests 2018-04-19 15:04:39 -04:00
bmedx
65147386c0 PLAT-2028 - Create mailing list retirement API endpoint
- Removes "email-optin" UserOrgTags for the user
- Creates and uses a new "UserRetireMailingsSignal" signal
- Creates and uses a new "CanRetireUser" permission
- Creates and uses a new setting "RETIREMENT_SERVICE_WORKER_USERNAME"
- Creates a signal handler to globally opt-out the user from Sailthru
2018-04-05 15:52:26 -04:00
Douglas Hall
7b65a76d33 Reverting celery task kwarg name. 2018-04-02 12:40:03 -04:00
Douglas Hall
2ecbe19b29 ENT-936 Allow TPA providers to be configured to not send a welcome email upon registration. 2018-03-28 14:00:35 -04:00
Waheed Ahmed
07a0aac814 Assign new sailthru var upon signup.
In SailThru, randomly set a var value of 0-9 on each user upon signup.

LEARNER-4177
2018-02-16 19:20:37 +05:00
uzairr
4e91ce19b1 Handle Exception in getting cookies from Sailthru
In order to send email, cookies are required from Sailthru,
ocassionally, celery task fails possibly because of request timeout
that ultimately fails login.To avoid it,generic exception handler
is added so that login will not fail in future.

LEARNER-3465
2018-01-31 18:35:19 +05:00
uzairr
1b6ed3ba21 Celery task to update sailthru purchase record
After change in the audit enrollment process, edX platform is
no longer keeping its audit enrollment record on sailthru.To keep
updated sailthru a celery task is created that will update sailthru
user profile in case of enroll/un-enroll of any audit enrollment course.

LEARNER-2694
2017-11-01 15:28:52 +00:00
tasawernawaz
9d7a1d5b53 send welcome email to only activated users
LEARNER-2474
2017-09-12 10:44:05 +05:00
Waheed Ahmed
33e077d4e2 Add activation_key var to user profile in SailThru.
As an email marketer, I would like to send an account activation reminder to learners who haven't activated
their accounts to increase their chances of coming back and engaging with our platform. Each user profile in
SailThru will have a var with the correct activation_key originally assigned to the user.

LEARNER-2110
2017-08-18 19:34:52 +05:00
Waheed Ahmed
f780b02b03 Send welcome email to inactive learners on registration.
LEARNER-2039
2017-08-09 16:39:14 +05:00
Waheed Ahmed
853c9cd8df Revert "Send welcome email to inactive learners on registration." 2017-08-08 19:00:09 +05:00
Waheed Ahmed
f073a11475 Send welcome email to inactive learners on registration.
LEARNER-2039
2017-08-07 12:44:50 +05:00
Anthony Mangano
398fd19ba5 Merge pull request #15502 from edx/LEARNER-1298-LEARNER-1299-send-ui-lang-to-sailthru
Set ui_lang in Sailthru when creating and updating users
2017-07-11 14:35:06 -04:00
Anthony Mangano
4f4f25b432 Set ui_lang in Sailthru when creating and updating users 2017-07-11 11:27:01 -04:00
Adeel Khan
a879ad201b Increased timeout value for sailthru api call.
LEARNER-1186
2017-07-11 17:46:10 +05:00
Adeel Khan
52e28d91fa Implementing connection timeout for sailthru api call.
LEARNER-1186
2017-07-06 14:54:19 +05:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Adeel Khan
73e6029de7 Logging Sailthru api call time for exploring optimal connection timeout value.
ECOM-7772
2017-05-12 17:06:55 +05:00
Simon Chen
764ef48332 Add logging for user cookie send for sailthru 2017-03-10 10:10:37 -05:00
umar-nawaz
d2f370dd38 Sailthru cookie name statements in add_email_marketing_cookies function 2017-02-17 16:35:39 +05:00
Simon Chen
3bda3c4a77 Remove Sailthru enrollment related signal handlers because they are being invoked from the ECOM service already.
ECOM-6581
2017-01-04 15:54:59 -05:00
Ahsan Ulhaq
eb895fae82 WL Enrollees on edX.org email list
ECOM-6324
2016-12-07 14:11:48 +05:00
PaulWattenberger
dd4bab3cb3 ECOM-5065 Don't treat invalid email response from Sailthru as retryable error 2016-07-28 10:35:10 -04:00