Optional hints

Pass information from an experimental URL parameter back to Blockly for the experiment in which users may have to press a button to see the hint.  Changes to Blockly are in https://github.com/code-dot-org/blockly/pull/757
Ooh, I hadn't known about that.


On Fri, Jul 18, 2014 at 4:50 PM, Brian Jordan <notifications@github.com>
wrote:

> In app/controllers/application_controller.rb:
>
> > @@ -132,6 +133,15 @@ def milestone_response(options)
> >        end
> >      end
> >
> > +    # Optionally, perform experiment where user must choose to see hint.
> > +    if hint_visibility_experiment_user_id ||
> > +        (ExperimentActivity::is_experimenting_hint_visibility? && current_user)
> > +      id = (hint_visibility_experiment_user_id && hint_visibility_experiment_user_id.to_i) ||
>
> First clause could be combined into
> hint_visibility_experiment_user_id.try(:to_i) (we use that pattern a
> bunch throughout the project)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/code-dot-org/dashboard/pull/1047/files#r15139586>.
>