Enabled testing of Stanford experiment.

Thanks.  That works.


On Thu, Jul 17, 2014 at 1:42 PM, Laurel <notifications@github.com> wrote:

> In app/controllers/application_controller.rb:
>
> > @@ -105,8 +105,15 @@ def milestone_response(options)
> >
> >      # Check if the current level_source has program specific hint, use it if use is set.
> >      if options[:level_source]
> > -      if current_user && ExperimentActivity.is_experimenting_feedback?
> > -        index = current_user.id % ExperimentActivity::FEEDBACK_EXPERIMENT_SOURCES.length
> > +      # For testing purposes, we are running the Stanford experiment when a URL
> > +      # parameter stanford_experiment is provided.  It should contain an
> > +      # integer, which is interpreted as a user id.
> > +      referer = @_env['HTTP_REFERER']
>
> can get the referer with request.referer (if you have access to request
> here... I think you do since you're in the controller)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/code-dot-org/dashboard/pull/1031/files#r15082698>.
>