Enabling Stanford and hint visibility experiments

- Specified levels on which experiments should take place.
- Switched to using ip addresses, rather than user ids, to determine experiment options.
- Added ip address hash to ActivityHint.
- Added and improved tests.
I just checked, and it's very rare for user.last_sign_in_ip to be null.  Do
you think I can infer that request.remote_ip is almost never null?


On Fri, Jul 25, 2014 at 2:50 PM, Ellen Spertus <ellen.spertus@code.org>
wrote:

>
> how often do we expect ip to be null?
>>
>> I have no idea.  I suppose I could fall back on section_id, or, if that's
> not present, user_id.
>
>> how important is it that everyone in the same classroom has the same hash value (if it's very important you can also check the section id)?
>>
>> Nice but not necessary.  The thinking was that it would be strange if one
> student was automatically shown hints while the student next to her was not.
>
>>  have you checked how often it is true that everyone in the same classroom will have the same 3rd segment, eg:
>>
>>  Section.all.order('rand()').first.students.collect(&:current_sign_in_ip)
>>
>> I just did some spot-checking.  It looks like most ip addresses of
> students in the same section are either identical or identical through the
> third segment but some differ entirely.  My query was:
>
> select f.section_id, u.id, u.current_sign_in_ip from users u, followers f
> where f.section_id>10000 and f.section_id < 10020 and f.student_user_id=
> u.id order by f.section_id, u.id;
>