edx/edx-platform — pull request #5006 by wedaly (2014-08-28 11:21:44+00:00)
Title: ECOM-199: Auto-registration bugfix

Sets a session variable as soon as a user enters the experimental condition to ensure that they stay in that condition, even if they later access the control URL (e.g. from a redirect on the login page)

@rlucioni I'm making the assumption here that once Optimizely puts a user in the experimental condition, she should stay in the experimental condition (a) for all courses she registers for, and (b) even if she logs out. (These assumptions are valid if Optimizely sets a flag on the user's session to track which condition they're in and doesn't reset it each time they visit the registration button.) Could you please verify that these assumptions are true?

@dianakhuang please review.

[ECOM-199](https://openedx.atlassian.net/browse/ECOM-199): Visitors removed from auto-enroll pool if they need to authenticate while attempting to enroll