From 7914a009154081122e411414eb7f4cbde8e0df40 Mon Sep 17 00:00:00 2001 From: Saleem Latif Date: Mon, 12 Jun 2017 14:50:40 +0500 Subject: [PATCH] Show Enterprise Logistration for coupon users --- lms/envs/common.py | 1 + openedx/features/enterprise_support/api.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lms/envs/common.py b/lms/envs/common.py index 72e0b9939f..1c62db2428 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -3189,6 +3189,7 @@ ENTERPRISE_EXCLUDED_REGISTRATION_FIELDS = { 'year_of_birth', 'mailing_address', } +ENTERPRISE_CUSTOMER_COOKIE_NAME = 'enterprise_customer_uuid' ############## Settings for Course Enrollment Modes ###################### COURSE_ENROLLMENT_MODES = { diff --git a/openedx/features/enterprise_support/api.py b/openedx/features/enterprise_support/api.py index 6e8ef3b2c0..592c1aa6f0 100644 --- a/openedx/features/enterprise_support/api.py +++ b/openedx/features/enterprise_support/api.py @@ -248,7 +248,7 @@ def enterprise_customer_for_request(request, tpa_hint=None): except EnterpriseCustomer.DoesNotExist: pass - ec_uuid = request.GET.get('enterprise_customer') + ec_uuid = request.GET.get('enterprise_customer') or request.COOKIES.get(settings.ENTERPRISE_CUSTOMER_COOKIE_NAME) if not ec and ec_uuid: try: ec = EnterpriseCustomer.objects.get(uuid=ec_uuid)