fix: pass in course key when checking the bucket for the streak discount experiment

This commit is contained in:
Matthew Piatetsky
2021-06-01 16:29:42 -04:00
parent 3048cfd1aa
commit cea450a35b
2 changed files with 3 additions and 1 deletions

View File

@@ -175,6 +175,8 @@ class ExperimentWaffleFlag(CourseWaffleFlag):
Arguments:
course_key (Optional[CourseKey])
This argument should always be passed in a course-aware context even if
course aware bucketing is False.
track (bool):
Whether an analytics event should be generated if the user is
bucketed for the first time.

View File

@@ -37,7 +37,7 @@ def get_celebrations_dict(user, enrollment, course, browser_timezone):
# We only want to bucket people into the AA-759 experiment
# if the course has not ended, is upgradeable and the user is not an enterprise learner
if can_show_streak_discount_experiment_coupon(user, course):
celebrations['streak_discount_experiment_enabled'] = STREAK_DISCOUNT_EXPERIMENT_FLAG.is_enabled()
celebrations['streak_discount_experiment_enabled'] = STREAK_DISCOUNT_EXPERIMENT_FLAG.is_enabled(course.id)
return celebrations