Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teacher opt-in to share email information with regional partners #42034

Merged
merged 14 commits into from Aug 31, 2021

Conversation

TurnerRiley
Copy link
Contributor

@TurnerRiley TurnerRiley commented Aug 13, 2021

Give teachers the ability to opt-in to sharing their emails with Code.org regional partners. Code.org’s regional partners offer local professional development workshops and community events for teachers. If they share their contact information with the partner in their state, the regional partner can notify the opted-in teachers of these opportunities and resources.

This choice (in the form of a radio button) will appear in the sign-up page for teachers in the United States and will be an optional choice (essentially defaulting to 'No'). This PR does not do the actual sharing of emails, it simply stores whether a given teacher has opted in to this program in their User.properties under the variable name share_teacher_email_regional_partner_opt_in.

The value of share_teacher_email_regional_partner_opt_in in User.properties based on the scenario (where N/A signifies that in this scenario the given choice would not be available to the user):

User type In the U.S.? Opted in? share_teacher_email_regional_partner_opt_in
Teacher Yes Yes DateTime.now to mark when they opted in
Teacher Yes No nil
Teacher Yes no selection nil
Teacher No N/A nil
Student N/A N/A nil

Old vs. new appearance

Original view teachers in the U.S. saw

Old no reg partner

New view teachers in the U.S. will now see (every other scenario (e.g. a teacher in another country) will look the exact same as the original)

New w reg partner

Links

Here is the spec.

Testing story

  • Added unit tests in /dashboard/test/controllers/registrations_controller_test.rb. The names of each scenario's respective unit test is listed in the 2nd-to-last column of the table below.
  • Local and adhoc manual testing in multiple browsers (namely Chrome, Edge, and IE11) to ensure each of the scenarios produces the correct output as outlined in the table. Each test video (found in the last column of the table below) ends with showing what is stored in User.properties where each row represents a user such that the last row of User.properties is the set of properties from the most-recently-created user.
User type In the U.S.? Opted in? Value of share_teacher_email_regional_partner_opt_in in User.properties Name of unit test in registrations_controller_test.rb Link to video of manual test
Teacher Yes Yes DateTime.now to mark when they opted in create new teacher with us ip with opt-in to sharing email with regional partners set share_teacher_email_regional_partner_opt_in value to DateTime value Manual test #1
Teacher Yes No nil create new teacher with us ip with opt-out to sharing email with regional partners ensure share_teacher_email_regional_partner_opt_in value is nil Manual test #2
Teacher Yes no selection nil create new teacher with us ip with no selection on sharing email with regional partners ensure share_teacher_email_regional_partner_opt_in value is nil Manual test #3
Teacher No N/A nil create new teacher with non-us ip ensure share_teacher_email_regional_partner_opt_in value is nil Manual test #4
Student N/A N/A nil create new student ensure share_teacher_email_regional_partner_opt_in value is nil Manual test #5

Future work

Start the Optimizely A/B experiment to ensure the presence of this new opt-in choice doesn't impede the rate of new users successfully signing up. It tracks this through number of successful sign-ups in both versions of the A/B experiment. This feature is toggled using the experiment flag "OPT_IN_EMAIL_REG_PARTNER". Once this PR is pushed, the experiment flag can be toggled using these links (which Optimizely will do for users automatically): ON / OFF.

If this will be run at the same time as the "Teacher vs. Student" experiment, then they will be run as mutually exclusive experiments.

Privacy

Does not store any extra personal information. At most, it will store a time stamp of when (if they did) select yes to sharing their email with a Code.org regional partner. As for the sharing of the email itself, the spec answers that with the following: "This does not necessitate a change to our privacy policy. Once we share the teacher’s email address with a regional partner, we no longer have a responsibility for how that teacher can unsubscribe from emails from the regional partner (they manage it at that point)."

@TurnerRiley TurnerRiley requested a review from a team as a code owner August 13, 2021 17:19
@TurnerRiley TurnerRiley requested a review from dju90 August 20, 2021 17:19
@dju90 dju90 requested a review from smusoke August 30, 2021 23:50
@TurnerRiley TurnerRiley merged commit 27f4478 into staging Aug 31, 2021
@TurnerRiley TurnerRiley deleted the share-teacher-email-regional-partner-opt branch August 31, 2021 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants