Commit Graph

600 Commits

Author SHA1 Message Date
Aarif
8526a989c3 Merge pull request #21115 from edx/INCR-446
INCR-446 Python 3 compatibility
2019-07-24 16:21:05 +05:00
Awais Qureshi
6edf9766df Merge pull request #21134 from edx/awais786/INCR-443
INCR-443
2019-07-19 13:46:34 +05:00
Awais Qureshi
3d2e0f7dde Merge pull request #21133 from edx/awais786/INCR-445
INCR-445
2019-07-19 13:44:38 +05:00
David Ormsbee
a712f1f93b Remove full table scan of VerificationDeadline. (#21119)
* Remove full table scan of VerificationDeadline.

Before this commit, we were doing a full table scan of
student_verificationdeadline, loading the results into a giant
dict, and reading/writing that to the cache. This was fine when the
code was introduced and there were dozens of courses, but now that
we're over 12K courses, it's becoming a major performance issue for
the Student Dashboard.

This uses a subquery to the course enrollment table so that we're
only ever pulling back the deadlines to a student's enrolled courses
for any given request. It removes the cache access entirely.
2019-07-17 10:25:08 -04:00
aarif
fd3a83236a ran python-modernize and isort on files mentioned in INCR-446
changes made to comply with quality

changes made to comply with quality

changes made to comply with quality
2019-07-16 15:14:12 +05:00
arbisoft
91aac28ca7 Fixing python-modernize issues. 2019-07-16 13:16:03 +05:00
arbisoft
6c39ec43be Fixing python-modernize issues. 2019-07-16 12:34:28 +05:00
usama sadiq
26d493e34d Certificate Generation Logs
Added additional logs in the certificate generation
task being executed after id verification of a learner.
2019-07-11 10:51:39 +05:00
Zainab Amir
f6603cb8cf Update verification expiry email criteria (#20725)
If already DEFAULT Number of emails are sent, then verify that user
is enrolled in at least one verified course run for which the course
has not ended else stop sending emails

LEARNER-7313
2019-07-03 14:19:22 +05:00
Josue Balandrano Coronel
df14f5cdf6 [BB-1132] Decrease NAME_MIN_LENGTH to 1 2019-06-06 22:52:00 +02:00
Zainab Amir
886834adb5 Move command arguments to common settings
Move command parameter arguments, resend-days and days-range, to
common settings. This will help in creating a consistency when the
default values are changed in the future.

LEARNER-7313
2019-05-28 14:49:27 +05:00
Stu Young
99bef9ecfa incr-295 (#20602)
* run python modernize

* run isort
2019-05-15 15:20:26 -04:00
Stu Young
17a81f263f incr-296 (#20603)
* run python modernize

* run isort
2019-05-15 14:46:19 -04:00
Jeremy Bowman
097807dc49 Fix time zone bug in send_verification_expiry_email (#20350) 2019-04-30 13:00:55 -04:00
Zainab Amir
d39b150d3b Fix Flaky test in TestSendVerificationExpiryEmail
datetime.now(UTC) gives unexpected results. Using "now()" function
from django.utils.timezone tends to be a much more reliable way to
get a time zone aware timestamp for the current time.

PROD-190
2019-04-18 10:55:48 +05:00
Zainab Amir
2471c12cc4 Get current site by ID
Getting current site by NAME was failing on stage.

LEARNER-5408
2019-04-08 12:54:34 +05:00
Zainab Amir
68a40cd770 Add comments for code implementation 2019-03-08 12:21:37 +05:00
Zainab Amir
2dbae49869 LEARNER-6946 management command to send verification expiry email
Template for email added (email/verification_expiry_email)
The management command filters the SoftwareSecurePhotoVerification model on the basis of following criteria :
-- the verification is approved
-- the start_date < expiry_date < today or specified days have passed to resend email
After the basic filtering batches are created to send email. For each verification in a batch email is sent and
email_expiry_date is set to 15 days from today (default days are 15, it can be changed too)
Between each batch there is a delay of sleep_time seconds
2019-03-07 14:31:27 +05:00
Zainab Amir
66b780d693 LEARNER-7136 populate expiry date and add mechanism for new verification
Method approve() is overridden to accommodate new users that will have their verification approved in the future.
The approve() method is called from software secure results callback every time a Software Secure Photo Verification
is approved.The method overridden now updates expiry_date and then calls super to perform task it was performing
before this change.The expiry_date set is the same as the one sent in verification approval email.

In results_callback for sspv the expiry_date and expiry_email_date for the most recent previous verification if exists
are also updated to NULL.
2019-03-06 18:41:30 +05:00
Simon Chen
1f491b4190 Revert "LEARNER-6945 Populate software secure photo verification"
This reverts commit 019f6c4dcf.
2019-02-26 14:13:58 -05:00
Zainab Amir
019f6c4dcf LEARNER-6945 Populate software secure photo verification 2019-02-22 11:01:57 +05:00
Julia Eskew
368f221f0a Initial start on annotations. 2019-02-19 11:24:21 -05:00
Calen Pennington
8c53ce6493 Merge pull request #19743 from edx/unicode7
fix unicode strings in lms/ part 2
2019-02-13 14:15:02 -05:00
Matthew Piatetsky
764319d3e0 fix unicode strings in lms/ part 2 2019-02-13 10:35:56 -05:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
cclauss
8fca11b85c Use print() function in both Python 2 and Python 3 2019-01-13 17:16:37 +01:00
Zainab Amir
b61df3af40 LEARNER-6944 Add new fields to SoftwareSecurePhotoVerification 2019-01-10 15:18:06 +05:00
Gabe Mulley
5311509b19 Provide more context to calls to Segment.
Implementation for DE-1089.

Centralize the definition of context into a single method.  This is in
common/djangoapps/track because the context is originally set there by
middleware.
2018-11-15 20:56:10 -05:00
Ned Batchelder
3353e7425e Remove unused imports 2018-11-03 16:07:05 -04:00
Alex Dusenbery
34199d9e98 Don't join to auth_user when getting verified user ids; use them in a set and not a list. 2018-09-07 11:59:46 -04:00
Jeremy Bowman
a5ab125096 Merge pull request #18790 from edx/jmbowman/TE-2689
TE-2689 Remove useless pylint suppressions part 3
2018-08-16 16:26:34 -04:00
Jeremy Bowman
68902a2f3f TE-2689 Remove useless pylint suppressions part 3 2018-08-16 09:57:01 -04:00
uzairr
af81113acf Update verification status emails
Previously Verfication status emails are sent using sail-thru.Now,
Separate templates are added in the platform that will be used to
sent status emails to the learners.

LEARNER-5931
2018-08-16 17:50:41 +05:00
Jeremy Bowman
02e4b87421 Merge pull request #18733 from edx/jmbowman/TE-2525
TE-2525 nose.tools removal part 1/2
2018-08-07 13:55:04 -04:00
J Eskew
6ee6e8935b Merge pull request #18711 from edx/jeskew/mgmt_cmd_cancel_user_retirement
Mgmt command to cancel user retirement request.
2018-08-07 12:03:11 -04:00
Jeremy Bowman
bcaec3c5bb TE-2525 nose.tools removal part 1/2 2018-08-07 08:30:12 -04:00
John Eskew
f92a8f6e24 Mgmt command to cancel user retirement request. 2018-08-06 17:00:40 -04:00
Jeremy Bowman
4e8668d3be TE-2524 Stop using nose.plugins - LMS 2 2018-08-01 13:54:06 -04:00
zubair-arbi
66937b2cdf ENT-1052 Rename enterprise customer catalog uuid in queryparam to catalog 2018-07-03 17:09:56 +05:00
zubair-arbi
bbdcf6de7a ENT-1052 discount by enterprise catalog 2018-06-29 16:04:06 +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
irfanuddinahmad
a46a28e983 incorporated manual verification 2018-06-25 12:08:54 +05:00
Tyler Hallada
1f42d1b384 Merge pull request #18316 from edx/thallada/PLAT-1524-on-delete
PLAT-1524: Add on_delete kwarg to ForeignKey & OneToOneFields
2018-06-06 10:38:15 -04:00
Tyler Hallada
1540f9ec72 Add on_delete kwarg to ForeignKey & OneToOneFields
Django 2.0 will make this field required for `ForeignKey` and `OneToOneFields`.
In previous versions the option defaulted to `models.CASCADE` when not
specified. This change should make the deprecation warnings in the current
Django version go away.

The migrations where also modified, but the changes should not cause a change in
the database schema since `models.CASCADE` was already the old default.
2018-06-05 17:05:12 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
uzairr
dfb295fe38 Send verification status email through sailthru
Support needs to inform a learner different states of its
id-verification.In order to achieve it email will be sent
to learner about its verification state using sailthru.

LEARNER-617
2018-05-07 12:30:47 +05:00
Stuart Young
1fd2167144 rebalance python unittests onto new shards 2018-05-03 11:16:05 -04:00
Brittney Exline
5b19309691 Merge pull request #18070 from edx/bexline/sso_id_verification2
ENT-945 Using SSOVerifications in ID Verification flow
2018-04-30 14:14:03 -06:00
Brittney Exline
91e63ed8e0 ENT-945 Using SSOVerifications in ID Verification flow
This reworks what was done #17930, since it had to be reverted from the IDVerificationAggregate migration.
We decided to abandon that model and directly read from both id verification models.
2018-04-30 11:57:59 -04:00
Gregory Martin
16a5555c7e Update models to 'Retire' not delete data
EDUCATOR-2700
2018-04-30 10:45:08 -04:00