109 Commits

Author SHA1 Message Date
Brian Beggs
7568e91a76 feat: check for session existance before cache access. ENT-9187. 2024-07-08 18:02:17 -04:00
Alex Sheehan
e73bfddbd8 chore: bumping enterprise version 3.61.1 2023-02-22 15:32:18 +00:00
Alex Sheehan
de28d61215 fix: downgrading enterprise version to 3.60.21 2023-02-16 19:29:33 +00:00
Alex Sheehan
b72875fd26 chore: bumping enterprise to version 3.61.0 2023-02-15 21:56:34 +00:00
Sameen Fatima
282d639e32 refactor: simplify code logic for consent_needed_for_course utility (#30775) 2022-07-27 16:34:06 +05:00
muhammad-ammar
dd70066644 chore: refine source param in dsc url 2022-06-17 15:05:29 +05:00
muhammad-ammar
415291fd27 feat: add source query param in data sharing consent url 2022-06-13 14:43:51 +05: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
Long Lin
9514cb5732 feat: add enterprise course enrollments data to enrollments for support 2022-01-19 10:14:13 -05:00
M. Zulqarnain
7aadf55387 feat: New codemods on OpenedX 4 (#28779) 2021-11-01 18:05:02 +05:00
Adam Stankiewicz
31f66a4f2c feat: enterprise learner portal access modal (#27736)
* feat: enterprise learner portal access modal

* fix: quality

* fix: remove log.info
2021-05-27 15:31:27 -04:00
muhammad-ammar
3929d098b6 update cache key for dsc 2021-04-06 17:34:42 +05:00
Awais Qureshi
d24f79a264 BOM-2442
pyupgrade in enterprise_support
2021-03-11 14:54:23 +05:00
Carla Duarte
7ecb393deb AA-510: a11y fix for learner dashboard enterprise link 2021-03-02 11:37:10 -05:00
Zainab Amir
c260f72c2e VAN-311: Add multiple enterprise support for Authn MFE (#26526) 2021-02-18 17:24:44 +05:00
Awais Qureshi
5ea60327b1 BOM-2336
Apply pylint-amnesty.
2021-02-04 16:49:47 +05:00
Saleem Latif
dfb36644c9 Upgraded edx-enterprise version to 3.15.0 and updated field name changed in that version. 2020-12-15 19:13:14 +05:00
Muhammad Ammar
60f30a9aa5 Merge pull request #25734 from edx/ammar/ent-3670-get-learners-enterprise-info-from-db
try to get learner's enterprise information from DB if there is no enterprise customer associated with sso provider id
2020-12-02 21:02:38 +05:00
muhammad-ammar
f19b074927 try to get learner's enterprise information from DB if there is no
enterprise customer associated with sso provider id

ENT-3670
2020-12-02 19:49:21 +05:00
muhammad-ammar
b9e87817f8 add logs for dsc flow to identify why None is being returned as
enterprise customer uuid for a learner even though the leaner has a
valid active enerprise present

ENT-3670
2020-12-02 14:08:30 +05:00
Muhammad Ammar
c508d42a5c Revert "extract a learners active enterprise existing details" 2020-12-01 22:29:59 +05:00
muhammad-ammar
a831520b8e extract a learners active enterprise existing details
ENT-3670
2020-12-01 12:37:17 +05:00
Alex Dusenbery
2204caaa6b ENT-3503 | Adds more unit tests for enterprise_support.api, and one TODO for same. 2020-11-23 11:42:36 -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
muhammad-ammar
f0aae8ecf5 * update DSC needed cache key to invalidate existing stored values
* refactor DSC logs

ENT-3494
2020-11-04 17:52:02 +05:00
muhammad-ammar
2cc0688e1c convert enterprise customer uuid to str before comparison
ENT-3494
2020-11-03 00:20:05 +05:00
muhammad-ammar
5f04fd35a0 more logs for data sharing consent
ENT-3494
2020-11-02 20:24:44 +05:00
muhammad-ammar
b8a315933f add log to get insights about why data sharing consent is not required 2020-10-29 20:57:27 +05:00
Muhammad Ammar
1d28f5d60f Merge pull request #25447 from edx/ammar/enterprise-customer-session-storage
update logic to store learner's enterprise customer info in request session
2020-10-27 19:35:37 +05:00
muhammad-ammar
5adf9fdd8b store a learners enterprise customer info into request session only if
user is authenticated. This is needed to avoid storing `None` as
enterprise customer info in request session.
2020-10-27 19:12:01 +05:00
Mike OConnell
0dc494360d Correcting error with undeclared local (#25422)
Previous rollback introduced this error while resolving merge
conflicts. Line declaring the local variable was accidentally
omitted.

ENT-3494
2020-10-23 12:48:59 -04:00
Mike OConnell
64ee4a8972 Rolling back previous changes (#25418)
Rolling back previous changes after unexpected behavior
when testing in stage.

ENT-3494
2020-10-23 07:09:09 -04:00
Mike OConnell
b4f7647b40 Moco/ent 3494 (#25408)
* Added logging statements around DSC

Added logging statements to help diagnose failures in presenting
Data Sharing Consent views to learners who have not consented to
data sharing, but their enterprise requires it

ENT-3494

* Yet more logging statements around DSC

Added more logging statements to help diagnose failures in presenting
Data Sharing Consent views to learners who have not consented to
data sharing, but their enterprise requires it. These new logs provide
further detail into the call to the enterprise API to check for consent.

This changelist slightly changes the logic to determine if a consent
check is needed. The changes involve breaking out the conditions of the
iterated checks on the learner details to allow for more granular logging.

ENT-3494
2020-10-22 21:33:16 -04:00
Mike OConnell
fa435e697b Added logging statements around DSC (#25320)
Added logging statements to help diagnose failures in presenting
Data Sharing Consent views to learners who have not consented to
data sharing, but their enterprise requires it

ENT-3494
2020-10-12 10:42:43 -04:00
Alex Dusenbery
3292104470 enterprise_customer_uuid_for_request() should not return a __CACHE_MISS__. 2020-09-29 12:03:33 -04:00
Alex Dusenbery
de277ce46b Prevent an unbound local variable exception in enterprise_support.api. Add more unit tests for same. 2020-09-22 11:15:17 -04:00
Alex Dusenbery
4ad2df083d Ensure that get_enterprise_learner_portal_enabled_message() returns None when there is no associated enterprise customer for the given request. Add unit tests for this function. 2020-09-21 12:47:00 -04:00
Alex Dusenbery
4bb1914ec6 ENT-3367 | Show at most 1 Enterprise Learner Portal dashboard link in the header user-menu. Also, guard against no branding config when getting learner portal data. 2020-09-18 10:23:32 -04:00
Brittney Exline
1af80ff205 [ENT-3315] Reduce calls to enterprise-learner endpoint by looking up data from db 2020-08-12 15:24:39 -06:00
Adam Stankiewicz
00f4ea3fc3 fix keyerror with request.session (#24642)
* fix keyerror with request.session

* improve the conditional
2020-07-29 20:44:43 -04:00
Jeff Chaves
87f444fd44 ENT-3143: display message banner guiding user to their enterprise LP if enabled (#24625)
* display message banner guiding user to their enterprise LP if enabled

* adding new sass class name to use same styling as recovery email alert
2020-07-29 11:55:02 -04:00
Jeff Chaves
e1bd970b46 ENT-2894: Use new welcome template when redirected from enterprise proxy login view (#24587)
* using new welcome template when redirected from enterprise proxy login view

* enabling safe redirects to enterprise learner portal from login in devstack

* ading admin portal to login redirect whitelist

* running make upgrade to version bump edx-enterprise
2020-07-24 17:40:42 -04:00
Mike O'Connell
d191b52ee9 Check current enterprise for consent
When checking if consent is needed, ignore any enterprise
learner details that are not for the learner's currently
active enterprise.

ENT-3049
2020-06-29 12:57:03 -04:00
HammadAhmadWaqas
11893ad69e refactored imports from edx-django-utils 2020-04-20 12:11:28 +05:00
HammadAhmadWaqas
b4ebe11a6b removed get_cache_key and using it from edx-django-utils. 2020-04-13 12:51:39 +05:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
hasnain.naveed
447f873924 ENT-2524 | Added the request META in exception traceback.
Only add `PATH_INFO` to log

removed METH from label too
2020-01-07 19:13:53 +05:00
Christian Clauss
6e8b4ccb08 Use ==/!= to compare str, bytes, and int literals
Identity is not the same thing as equality in Python so use ==/!= to compare str, bytes, and int literals. In Python >= 3.8, these instances will raise SyntaxWarnings so it is best to fix them now. https://docs.python.org/3.8/whatsnew/3.8.html#porting-to-python-3-8
2020-01-02 19:26:13 +01:00
Zaman Afzal
363a75cc99 ENT-2518 Fix Enterprise Login Page not showing to the user (#22602) 2020-01-01 15:18:45 +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