Commit Graph

671 Commits

Author SHA1 Message Date
Bryann Valderrama
f90e59e52a docs: add event_type inline code annotation for open edX events (#36355) 2025-03-14 09:55:50 +01:00
Brian Mesick
e478975105 chore: Add missing PII annotations, update safelist
PII Annotations are very out of date, this commit adds most that were
missing in edx-platform, and some additional annotations to the
safelist. It is not comprehensive, several other upstream Open edX
packages also need to be updated. It also does not include removing
annotations that have been moved upstream, or been removed entirely.
Those are separate follow-on tasks.
2024-11-05 12:58:36 -05:00
Alison Langston
243b1b4e2e feat: update management command to manually create verified names (#35619)
* feat: update management command to manually create verified names

* fix: update function name
2024-10-09 11:16:02 -04:00
michaelroytman
59b9bb88e1 fix: VerificationAttempt.expiration_datetime field may be None.
This commit fixes a bug introduced by the new VerificationAttempt model. The expiration_datetime field is nullable. Other IDV models in the verify_student application have a default value for expiration_date, so they are typically not null, despite being nullable.

This commit updates code that queries this field to function correctly when the value of expiration_datetime is None. In this case, a None expiration_datetime indicates a non-expiring attempt.
2024-10-07 15:54:55 -04:00
Zachary Hancock
c34ccffc7f feat: rework idv cert trigger (#35580)
* feat: rework idv cert trigger
* feat: separate PhotoVerification events
2024-10-04 12:58:15 -04:00
Alison Langston
06a556069f fix: connect verify_student handlers to app (#35561) 2024-09-30 13:49:11 -04:00
Alison Langston
5043260bd6 feat: deprecate get_verification_details_by_id (#35560) 2024-09-30 11:30:46 -04:00
Isaac Lee
dac0309b0f fix: add should_display_status_to_user method and status_changed field to VerificationAttempt model (#35514)
* fix: add placeholder should_display_status_to_user

* fix: have VerificationAttempt inherit StatusModel

- should_display_status_to_user now returns False

* chore: makemigrations

* feat: status_changed field added

* temp: idea to add should_display_status_to_user

* feat: add should_display_status_to_user

* fix: correct call in helpers+services

* chore: lint+test fix

* fix: default hide_status_user as False

* chore: rename field call to STATUS

* chore: remove extra status field

- comment cleanup

* temp: lint + comment out created status for now

* fix: revamp status_changed for back-compat

* fix: override save for status_changed

* fix: replace created/updated instead of status

- also made migrations

* fix: squash commits

- also remove extra updated_at property

* chore: nits
2024-09-26 20:58:01 +00:00
Zachary Hancock
ae0c295ead feat: pluggable url for idv location (#35494)
* Adds an extension point when generating the url for id verification
2024-09-25 16:09:10 -04:00
Varsha Menon
aeebac97ba feat: add verification attempt django admin 2024-09-24 10:52:31 -04:00
Zachary Hancock
0196def99d feat: use idv approved event (#35470)
* feat: replace LEARNER_NOW_VERIFIED signal with new openedx-event
2024-09-19 09:24:20 -04:00
Isaac Lee
575e240961 feat: add idv events to api (#35468)
* feat: add idv events to api

- moved what was in signals.py to a handlers.py (which is what their file should have been called)

* chore: quality

* fix: rename test file + imports

* fix: change handler reverse url in other tests

* fix: refactor signals and handlers pattern

- following OEP-49 pattern for signals directory
- user removed as param for update function
- event now emitted after save

* fix: unpin edx-name-affirmation

* chore: add init to signals dir

* fix: compile requirements

* chore: quality

* chore: fix some imports

* chore: quality

* test: added signal emissions to test_api

* chore: lint
2024-09-17 15:59:33 -04:00
Mohammad Ahtasham ul Hassan
6a63cfcaa4 feat: add override option to upgrade CTA utils and add course_run_key identifier (#35441)
* feat: add override option to upgrade CTAs and send course_run_key identifier
2024-09-16 13:15:51 +05:00
Zachary Hancock
d59e2f4fad feat: Add VerificationAttempt model to IDVerificationService logic (#35311)
the new VerificationAttempt model (#35304) will now be taken into account when determining a user's verification status.
2024-09-11 10:30:37 -04:00
Alison Langston
2c28ef110f feat: add LMS retirement listener for VerificationAttempts (#35436) 2024-09-10 14:57:02 -04:00
Isaac Lee
a3871cda22 API functions for the new generic VerificationAttempt model in the verify_student app (#35338)
* feat: add VerificationAttempt model to verify_student application

This commits adds a VerificationAttempt model to store implementation and provider agnostic information about identity verification attempts in the platform.

* feat: add api for VerificationAttempt model

* fix: error handling for update

- added tests accordingly
- also took care of some nits

* chore: lint

* chore: lint for equals spaces

* feat: using generic update function instead

- can now update name, status, and exp. date on generic attempts
- changed tests accordingly
- a few nits

* chore: fix docstring args

* fix: corrected status validation

- reverted to old status validation method
- fixed tests accordingly

* fix: datetime, status, and annotation fixes

- expiration_datetime can be updated to None
- VerificationAttemptStatus is now StrEnum
- Added type annotations for api functions

---------

Co-authored-by: michaelroytman <mroytman@edx.org>
2024-09-09 13:16:29 -04:00
michaelroytman
b30318af6a feat: add VerificationAttempt model to verify_student application
This commits adds a VerificationAttempt model to store implementation and provider agnostic information about identity verification attempts in the platform.
2024-08-26 10:54:30 -04:00
michaelroytman
f94a7f7f68 feat: send IDV approval email in approve_id_verifications management command
This commit modifies the approve_id_verifications management command to send an IDV approval email to learners. This ensures that learners are informed of approvals to their IDV attempts when performed using the management command. This more closely mirrors the way IDV approvals work when using an IDV vendor.
2024-05-30 15:03:44 -04:00
michaelroytman
541bc6f5cb feat: add must_retry as valid status to approve_id_verifications management command
Sometimes, submissions to an IDV provider fail, which results in an IDV attempt moving from the "ready" status into the "must_retry" status instead of the "submitted" status.

We would like to approve these attempts too.
2024-04-05 14:01:45 -04:00
michaelroytman
56719e9680 feat: add new management command to approve submitted ID verification attempts
This pull requests adds a new management command approve_id_verifications to manually approve submitted ID verification attempts (i.e. instances of the SoftwareSecurePhotoVerifications model).
2024-03-08 12:37:03 -05:00
Michael Roytman
95b3e88ba5 temp: add supplemental logging to debug IDV issues (#34248)
This commit adds some supplemental, more verbose logging to the results_callback view in the verify_student Djangoapp. This endpoint is called by identity verification (IDV) providers to POST an IDV review to edX.

We are experiencing issues with receiving IDV reviews from our IDV provider, and these logs will help us diagnose whether there is an issue in edX's systems.

These logs will be removed after our investigation is complete.
2024-02-16 08:48:29 -05:00
Feanil Patel
e3851ab3d1 test: Update to reuse variables in more places.
Some of the places where we had explicit copies of the password were not
necessary so we referece the exsting TEST_PASSWORD variable where
possible.
2023-10-16 12:33:25 -04:00
Feanil Patel
64e91d4080 test: Update to an even longer password. 2023-10-12 10:31:13 -04:00
Feanil Patel
1e2ea85372 test: Update more tests that had short passwords. 2023-10-10 16:36:26 -04:00
Usama Sadiq
a0076c1243 fix: fix django 41 deprecation warnings (#33099) 2023-08-28 13:32:39 +05:00
Awais Qureshi
4aca4d3fbb chore: Rename the bucket to bucket_name. (#32576)
https://github.com/jschneier/django-storages/blob/master/CHANGELOG.rst#1101-2020-09-13
2023-06-27 13:17:28 +05:00
Isaac Lee
b0da68aa3a fix: resubmit IDV attempts for early march 2023 (#31999)
* fix: resubmit IDV attempts for early march 2023

- initial commit w/ direct copy of retry_failed_photo_verifications.py

* fix: resubmit IDV attempts for early march 2023

- corrected filter and comments

* feat: re-submit in date range

* feat: reworked other command instead

* temp: building tests

* test: unit test complete

* fix: quality

* fix: remove old file

* temp: building tests

* temp: tests w/ debug

* test: reverted old files + removed debug

* chore: quality

* chore: NITs
2023-04-04 15:38:34 -04:00
Awais Qureshi
20ef29da53 chore: Replaced boto usage with boto3. (#31886)
* chore: Replaced boto usage with boto3.
2023-03-07 15:47:48 +05:00
Usama Sadiq
997f194669 Revert "build: remove boto old version (#31282)" (#31733)
This reverts commit 14e6040141.
2023-02-09 18:36:59 +05:00
Muhammad Umar Khan
14e6040141 build: remove boto old version (#31282) 2023-02-09 15:21:10 +05:00
Eugene Dyudyunov
b4fecd620b refactor: rename toggle_warnings to toggle_warning (#30458)
Rename toggle_warnings to toggle_warning for consistency with setting_warning.
2022-05-24 11:47:31 -04:00
Eugene Dyudyunov
52dd883a3c refactor: delete now unused FutureCourseWaffleFlag (#30367)
Remove temporary FutureCourseWaffleFlag class;
Update ora2 and edx-toggles to versions cleaned from the
LegacyWaffle* classes;
Replace `override_flag`s with `override_waffle_flag`;
Replace `override_switch`s with `override_waffle_switch` (where it's possible).
2022-05-13 08:48:42 -04:00
Eugene Dyudyunov
289e682b8f FC-0001: Remove old EdxRestAPIClient usage across the platform (#30301)
* refactor: remove EdxRestAPIClient

* test: update tests according to EdxRestAPIClient removal

* fix: remove unused import
2022-05-09 12:48:26 -04:00
Eugene Dyudyunov
8bd43207ca refactor!: switch from LegacyWaffle* to modern waffles (#30330)
This is a first stage for removing the LegacyWaffle* classes.

LegacyWaffleFlag usage replaced with WaffleFlag;
LegacyWaffleSwitche usage replaced with WaffleSwitch;
New CourseWaffleFlag added to the temporary module __future__ as FutureCourseWaffleFlag;
Updated all the imports to use CourseWaffleFlag from the __future__ module;

BREAKING CHANGE: A number of toggle related constants (e.g. ENABLE_ACCESSIBILITY_POLICY_PAGE)
changed types. They were strings, and are now toggle instances (e.g. WaffleSwitch). Although the entire
refactor should be self-contained in edx-platform, if any plugins or dependencies were directly
using these constants, they will break. If this is the case, try to find a better publicized way of
exposing those toggles.
2022-05-05 12:03:10 -04:00
Michael Terry
b8ecfed67d fix: use safer ip-chain logic when checking ip for embargos
Specifically:
- check ALL ip addresses in the client ip chain for blocking
- check RIGHTMOST ip address in the client ip chain for allowing

Before, we always checked the LEFTMOST ip address in both cases.

AA-1234
2022-04-22 11:15:02 -04:00
Simon Chen
0b158a8a42 feat: provide new verification details endpoint for support-tools (#30004)
Co-authored-by: Simon Chen <schen@edX-C02FW0GUML85.local>
2022-03-03 10:33:14 -05:00
Bianca Severino
f177855e1b feat: add REST endpoint to confirm name changes 2022-03-01 16:22:31 -05:00
Michael Terry
cb1bb7fa64 test: switch default test store to the split store
It's long past time that the default test modulestore was Split,
instead of Old Mongo. This commit switches the default store and
fixes some tests that now fail:
- Tests that didn't expect MFE to be enabled (because we don't
  enable MFE for Old Mongo) - opt out of MFE for those
- Tests that hardcoded old key string formats
- Lots of other random little differences

In many places, I didn't spend much time trying to figure out how to
properly fix the test, and instead just set the modulestore to Old
Mongo.

For those tests that I didn't spend time investigating, I've set
the modulestore to TEST_DATA_MONGO_AMNESTY_MODULESTORE - search for
that string to find further work.
2022-02-04 14:32:50 -05:00
Bianca Severino
5895f49683 fix: remove code related to IDV experiment 2022-01-25 16:32:40 -05:00
Jawayria
305bd8ff76 chore: Applied lint-amnesty on lms/djangoapps/{teams, verify_student} 2021-12-20 15:45:00 +05:00
edX requirements bot
bb20b17428 Python Requirements Update (#29516)
* chore: Updating Python Requirements

* fix: fix pylint issues

Co-authored-by: Mohammad Ahtasham ul Hassan <mohammad.ahtasham@arbisoft.com>
2021-12-08 14:13:27 +05:00
Waheed Ahmed
5d5a11fc16 chore: remove pyc file added by mistake (#29529) 2021-12-08 12:22:57 +05:00
Zainab Amir
acf5add774 feat: add marketing email option on registration (#29397) 2021-12-07 17:16:28 +05:00
Usama Sadiq
780a6f3c2d Revert "chore: install codejail from pypi (#29481)" (#29501)
This reverts commit 21551095ac.
2021-12-02 22:19:15 +05:00
Mohammad Ahtasham ul Hassan
21551095ac chore: install codejail from pypi (#29481)
* chore: install codejail from pypi

* chore: Updating Python Requirements

* chore: Updating Python Requirements

* fix: fixed failing tests

* fix: fixed pytest failures

* fix: fixed failing test bug

* Update mocks.py

Co-authored-by: edX requirements bot <testeng+edx-requirements-bot@edx.org>
2021-12-02 17:07:29 +05:00
M. Zulqarnain
95dbcaa323 feat: Django codemods on LMS (4) (#28854) 2021-11-19 15:10:58 +05:00
Andy Shultz
f70b3cff77 fix: simplify most recent verification function
current use is much less complicated than old code
2021-11-15 16:39:06 -05:00
alangsto
537ae9fcea fix: latest IDV expiration date should be returned (#29320)
The lack of ordering for a django query that grabbed verification records is blocking learners with multiple SSO records from taking proctored exams. All IDV records should be sorted by a key first, and then the correct expiration date can be determined.
2021-11-15 14:43:04 -05:00
Zachary Hancock
abf1f21668 fix: bulk verification creation failure for large input (#29197)
Fixes an issue where bulk create was only batching writes. With a sufficiently large input the users queryset would fail to evaluate due to the size of the filter list sent to the db.
2021-11-02 17:45:43 -04:00
Michael Roytman
b953ef044e Merge pull request #29155 from edx/mroytman/MST-1130-management-command-cleanup
feat: Add Management Command to Re-Emit SoftwareSecurePhotoVerification post_save Signal
2021-11-01 15:01:49 -04:00