Skip to content
Snippets Groups Projects
Unverified Commit 565018bd authored by julianajlk's avatar julianajlk Committed by GitHub
Browse files

Update FPD holdback to 10% for longitudinal analysis (#24037)

REV-1153
parent 7341f296
Branches
Tags release-2020-05-26-15.05
No related merge requests found
......@@ -96,6 +96,9 @@ def can_receive_discount(user, course, discount_expiration_date=None):
return False
# TODO: Add additional conditions to return False here
# Turn holdback on
if _is_in_holdback(user):
return False
# Check if discount has expired
if not discount_expiration_date:
......@@ -146,8 +149,8 @@ def _is_in_holdback(user):
if datetime(2020, 8, 1, tzinfo=pytz.UTC) <= datetime.now(tz=pytz.UTC):
return False
# Holdback is 50/50
bucket = stable_bucketing_hash_group(DISCOUNT_APPLICABILITY_HOLDBACK, 2, user.username)
# Holdback is 10%
bucket = stable_bucketing_hash_group(DISCOUNT_APPLICABILITY_HOLDBACK, 10, user.username)
request = get_current_request()
if hasattr(request, 'session') and DISCOUNT_APPLICABILITY_HOLDBACK not in request.session:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment