Commit Graph

600 Commits

Author SHA1 Message Date
Simon Chen
1edec15dd5 MST-400 Always return the latest approved valid ID verification (#25453) 2020-10-28 09:27:38 -04:00
Jeremy Bowman
d19368525b DEPR-43 Remove most of the shoppingcart app (#24692)
Removed most of the deprecated shoppingcart app, leaving just enough to allow us to cleanly remove the related database tables later. Also removed the relevant Django settings that weren't in use elsewhere.
2020-10-14 14:24:52 -04: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
Diana Huang
657da20c6e DEPR-43 - Remove JS that refers to shoppingcart receipt page. (#24890)
https://openedx.atlassian.net/browse/DEPR-43

Co-authored-by: Jeremy Bowman <jbowman@edx.org>
2020-09-29 16:08:42 -04:00
Calen Pennington
4a120a9e26 Fix failures caused by removing lms/djangoapps from sys.path 2020-09-23 10:05:37 -04:00
Régis Behmo
a4ba4ae45e Clarify many feature toggle annotations across all applications 2020-09-16 15:20:43 +02:00
Régis Behmo
7d93715880 Rename toggle_expiration_date to toggle_target_removal_date
This is part of the changes brought by code-annotations==0.7.0
2020-09-16 15:19:16 +02:00
Régis Behmo
98a13d6a7e Remove deprecated toggle_status annotation
This annotation is deprecated since code-annotations==0.7.0
2020-09-16 15:19:15 +02:00
Régis Behmo
ab0e21455a Get rid of the toggle_category annotation, now deprecated
Since code-annotations==0.7.0, this annotation is not used anymore.
2020-09-16 15:16:13 +02:00
Régis Behmo
7dc460d50a Wrap toggle annotation lines with multiline comments
This takes advantage of the new multiline annotation format with
single-line comment prefix, from code-annotations.
2020-09-16 15:16:12 +02:00
Régis Behmo
307457a255 Simplify hack to obtain waffle module names
Instead of going up the stacktrace to find the module names of waffle
flags and switches, we manually pass the module __name__ whenever the
flag is created. This is similar to `logging.getLogger(__name__)`
standard behaviour.

As the waffle classes are used outside of edx-platform, we make the new
module_name argument an optional keyword argument. This will change once
we pull waffle_utils outside of edx-platform.

Note that the module name is normally only required to view the list of
existing waffle flags and switches. The module name should not be
necessary to verify if a flag is enabled. Thus, maybe it would make
sense to create a `add` class methor similar to:

    class WaffleFlag:
        @classmethod
        def add(cls, namespace, flag, module):
            instance = cls(namespace, flag)
            cls._class_instances.add((instance, module))
2020-09-14 09:30:24 +02:00
daphneli-chen
9a8f1aa96e Merge pull request #24702 from edx/dlichen/AA-274
Dlichen/AA-274
2020-08-14 12:51:31 -07:00
Daphne Li-Chen
f557e395de AA-274: sending credit requirement information and added tests 2020-08-14 14:39:44 -04:00
Bianca Severino
4d19d9687c Change URLs in IDV related emails to the new experience 2020-08-12 09:22:42 -04:00
Bianca Severino
041becc846 Implement waffle flag for IDV redirect
Created helper function to render url dynamically

Modify helper function to include reverify links

Fix code based on failing tests

Fixed query string in redirect URL
2020-07-13 16:43:59 -04:00
Robert Raposa
77e490f057 ARCHBOM-1305: remove deprecated flag_undefined_default (#24426)
This is the final step in removing the deprecated
flag_undefined_default as explained by the following ADR:
https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/waffle_utils/docs/decisions/0001-refactor-waffle-flag-default.rst

Notes:

* All uses of flag_undefined_default=False were always
  supposed to have been no-ops.
* All uses of flag_undefined_default=True that are removed
  in this PR have been replaced by migrations in past PRs.
* The temporary metric temp_flag_default_used id no longer
  reporting any data.

ARCHBOM-1305
2020-07-09 09:31:31 -04:00
Awais Jibran
b30635af83 Merge pull request #24398 from edx/aj/remove-deprecated-idv-emails
Deprecate old idv emails
2020-07-09 16:10:13 +05:00
Asad
206977d571 Fixed email sent on valid sso verification 2020-07-09 13:37:35 +05:00
Awais Jibran
adaa701a76 Deprecate old idv code 2020-07-09 11:53:16 +05:00
Awais Jibran
44bde2f9da Patch IDV emails approved 2020-07-02 14:47:09 +05:00
Awais Jibran
0142dcdf86 Adding ID Verification Approved email template.
PROD-1639
2020-06-29 12:17:55 +05:00
Daniel Francis
82c0ca0da8 Fixing implicit parser name for Beautiful Soup (lms, openedx) (#24100)
Fixing 56 GuessedAtParserWarnings, in commit edx#24098

Background: BeautifulSoup automatically picks the fastest parser available. By default, it picks the "lxml" parser.

Per the [BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser) documentation:

> Beautiful Soup supports the HTML parser included in Python’s standard library, but it also supports a number of third-party Python parsers. One is the lxml parser. Depending on your setup, you might install lxml with one of these commands.
> Another alternative is the pure-Python html5lib parser, which parses HTML the way a web browser does. 

Context: We changed two statements, one in lms and another in openedx. Both statements fire up BeautifulSoup. Now we explicitly ask for "lxml," following the recommendation on BeautifulSoup's documentation:

> If you can, I recommend you install and use lxml for speed. If you’re using a very old version of Python – earlier than 2.7.3 or 3.2.2 – it’s essential that you install lxml or html5lib. Python’s built-in HTML parser is just not very good in those old versions.

Before:
`soup = BeautifulSoup(content)`

After:
`soup = BeautifulSoup(markup=content, features="lxml")`

The warnings are gone, tests are passing in local.
2020-06-18 15:41:07 -04:00
Diana Huang
c7bd5a8a15 Remove more references to fix tests. 2020-06-09 13:06:44 -04:00
Diana Huang
61563697c7 Remove shoppingcart references from verify_student. 2020-06-09 13:06:44 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Awais Jibran
465d864c77 Adds settings for celery task auto discovery 2020-04-23 12:52:16 +05:00
Kyle McCormick
29932a986e Add APIView for ID verification status (#23760)
For Hackathon XXIV IDv page overhaul.
2020-04-17 17:20:29 -04:00
adeelehsan
0e3bf36ced Verification enabled for the software secure
PROD-1395
2020-04-17 12:26:12 +05:00
Awais Jibran
a2091d06ce Rebase and improve logging. 2020-04-13 14:14:11 +05:00
Awais Jibran
d3ada8a2ef Handle json serializable exception. 2020-04-13 14:14:11 +05:00
Awais Jibran
804fac9358 Adds retry logic for software secure 2020-04-13 14:14:11 +05:00
Ahtisham Shahid
9b75659b9a Merge pull request #23657 from edx/ahtisham/PROD-1424
changed verification email type to html
2020-04-10 18:50:07 +05:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Ahtisham Shahid
34d126f9e5 changed verification email type to html
changed verification email type to html

changed verification email type to html

changed verification email type to html
2020-04-08 14:50:49 +05:00
Waheed Ahmed
3dc3e10819 Revert "Adds retry logic for software secure." 2020-04-07 20:40:06 +05:00
Waheed Ahmed
21105898da Revert "Remove todo" 2020-04-07 20:36:39 +05:00
Awais Jibran
262b7f7bdc Remove todo 2020-04-07 11:03:17 +05:00
Awais Jibran
4b22554411 Merge pull request #23514 from edx/aj/ss-retry-logic
Adds retry logic for software secure.
2020-04-07 10:59:57 +05:00
Awais Jibran
f592f133c5 remove update_from_database from views. 2020-04-06 21:00:53 +05:00
Diana Huang
99863aebff Remove course_id field from CourseMode.
Handle this change appropriately in CourseModeFactory.
2020-04-06 11:21:28 -04:00
Awais Jibran
de3410c733 Move attempt.refresh_from_database call to the tests. 2020-04-06 17:04:58 +05:00
Awais Jibran
4ead215665 Adds retry logic for ss.
1. Created a new celery queue with key `SOFTWARE_SECURE_VERIFICATION_ROUTING_KEY`.
2. Added a celery task with retry logic.
3. sorted imports with isort.
4. Changed deprecated `log.warn` => `log.warning`.
2020-04-06 15:16:56 +05:00
Awais Qureshi
9fc3dcb5d6 BOM-1490
None is not a valid value for posting.
2020-04-04 21:07:55 +05:00
Adam Blackwell
bb09c07c68 Revert "Certification verification enabled"
This reverts commit 3f1220276d.
2020-04-03 18:57:58 -04:00
adeelehsan
3f1220276d Certification verification enabled
Previously software secure was using self sign certificates.
Now they are not using it that's why we are enabling ssl
certificate verfication.

PROD-1395
2020-04-03 11:11:13 +05:00
Michael Terry
7999bdfbe9 Fix error in verification email command
We are seeing an error in the send_verification_expiry_email job
because one verification model instance had a null expiry_date but
a non-null expery_email_date.

This makes us more robust to that odd data and makes the job more
robust by having it still send other emails out even if one fails.

AA-70
2020-03-20 11:32:03 -04:00
Matt Hughes
acce8baca4 Add management command for retroactively adding sso IdV for IdP
We sometimes update preexisting SAML SSO providers to configure them
to automatically create SSO identity verification (IdV) records when a
learner links an account via that provider. Turning that configuration
from off to on does make it such that when learners log back in via
their linked account, a new IdV record will be created for them. But
it's possible we'd want this process to happen more automatically and
seamlessly, for which this management command will be helpful.

Note that this does not help with removing SSO verification records
for a provider for which this configuration has been turned off.

JIRA:EDUCATOR-4947
2020-03-17 16:04:24 -04:00
Awais Qureshi
220cab965f BOM-1126
Removing the moto from repo.
2020-01-15 22:34:13 +05:00
Mahyar Damavand
f1c5981fab Removing deprecated management commands which intended to clear historical data (#21522) 2020-01-08 12:50:34 -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