Revert "[wip] stop bucketing into discount experiment a week before cyber monday"
This commit is contained in:
committed by
GitHub
parent
d3d8660e15
commit
c670688dcd
@@ -71,10 +71,7 @@ def get_discount_expiration_date(user, course):
|
||||
except ExperimentData.DoesNotExist:
|
||||
pass
|
||||
|
||||
now = datetime.now(tz=pytz.UTC)
|
||||
stop_bucketing_into_discount_experiment = datetime(2019, 11, 22, 0, 0, 0, 0, pytz.UTC)
|
||||
|
||||
if not time_limit_start and not now > stop_bucketing_into_discount_experiment:
|
||||
if not time_limit_start:
|
||||
enrollment = course_enrollment.first()
|
||||
try:
|
||||
# Content availability date is equivalent to max(enrollment date, course start date)
|
||||
|
||||
@@ -104,17 +104,13 @@ def get_first_purchase_offer_banner_fragment(user, course):
|
||||
discount percentage and a link to upgrade.
|
||||
"""
|
||||
if user and not user.is_anonymous and course:
|
||||
now = datetime.now(tz=pytz.UTC)
|
||||
stop_bucketing_into_discount_experiment = datetime(2019, 11, 22, 0, 0, 0, 0, pytz.UTC)
|
||||
now = datetime.now(tz=pytz.UTC).strftime(u"%Y-%m-%d %H:%M:%S%z")
|
||||
saw_banner = ExperimentData.objects.filter(
|
||||
user=user, experiment_id=REV1008_EXPERIMENT_ID, key=str(course)
|
||||
)
|
||||
if not saw_banner and not now > stop_bucketing_into_discount_experiment:
|
||||
if not saw_banner:
|
||||
ExperimentData.objects.create(
|
||||
user=user,
|
||||
experiment_id=REV1008_EXPERIMENT_ID,
|
||||
key=str(course),
|
||||
value=now.strftime(u"%Y-%m-%d %H:%M:%S%z")
|
||||
user=user, experiment_id=REV1008_EXPERIMENT_ID, key=str(course), value=now
|
||||
)
|
||||
discount_expiration_date = get_discount_expiration_date(user, course)
|
||||
if (discount_expiration_date and
|
||||
|
||||
Reference in New Issue
Block a user