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

Add parent email confirmation when added to a student account #34015

Merged
merged 6 commits into from Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions dashboard/app/mailers/parent_mailer.rb
Expand Up @@ -7,4 +7,10 @@ def student_associated_with_parent_email(parent_email, student)

mail to: parent_email, subject: I18n.t('parent_mailer.student_associated_subject')
end

def parent_email_added_to_student_account(parent_email, student)
@student = student

mail to: parent_email, subject: I18n.t('parent_mailer.parent_email_added_subject')
end
end
@@ -0,0 +1,53 @@
%p
Welcome to Code.org! You have successfully linked your email to your child’s account.
We're thrilled that you have taken the next step in supporting #{@student.name} in their learning and exploration of
computer science. If you are not #{@student.name}’s parent, please reply to this email or contact support@code.org.

%h3
Looking for a place to get started?
%p
We’ve collected a set of
%a{href:"https://code.org/athome"}resources for learning at home,
including fun introductory tutorials, short educational videos, express courses, and open-ended projects.

%p
You and your student can also participate in Code Break each Wednesday at 10 am PST / 1 pm ET.
Code Break is a live, interactive classroom with weekly challenges to engage students of all abilities,
even those without computers. Learn more about
%a{href:"https://code.org/break"}Code Break.

%p
Don’t have a computer? We can suggest some options that work great on mobile phones or tablets too!
%a{href:"https://code.org/athom#apps"}See smartphone options.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
%a{href:"https://code.org/athom#apps"}See smartphone options.
%a{href:"https://code.org/athome#apps"}See smartphone options.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!


%h3
Keep track of what your child is learning
%p
Parent excitement and involvement can help keep kids motivated as they learn - try checking in with your student when
you can to see what they’ve built. Encourage them to browse the
%a{href:"https://studio.code.org/projects/public"}games or artwork project gallery
and get inspired to make their own code artwork. You can print it and hang it up, email it to a relative, or share it on social media.
%a{href:"https://support.code.org/hc/en-us/articles/360041539831-How-can-I-keep-track-of-what-my-child-is-working-on-on-Code-org-"}Learn more.

%h3
Stay involved with CS Education
%p
Code.org believes every student in every school should have the opportunity to learn computer science.
Our coding platform and K-12 computer science curriculum are the most broadly used in the world,
and generous donors make them free for your student. Please consider
%a{href:"https://donate.code.org/campaign/support-computer-science-education/c172233"}supporting our work
to enable more children to learn for free. And explore other
%a{href:"https://code.org/help"}ways to get involved.

%p
Thank you for supporting and encouraging your child’s learning!

%p
Hadi Partovi
%br
Founder, Code.org

%p
P.S. We take student privacy very seriously at Code.org. Read our
%a{href:"https://code.org/privacy"}privacy policy
for details.
1 change: 1 addition & 0 deletions dashboard/config/locales/en.yml
Expand Up @@ -250,6 +250,7 @@ en:
%{name}
parent_mailer:
student_associated_subject: 'Login information for Code.org'
parent_email_added_subject: 'Welcome to Code.org'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an exclamation point to the end of the subject? 'Welcome to Code.org!' (same as the teacher email)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

teacher_mailer:
new_teacher_subject: 'Welcome to Code.org!'
delete_teacher_subject: 'Code.org notification: Your account has been deleted'
Expand Down
9 changes: 9 additions & 0 deletions dashboard/test/mailers/previews/parent_mailer_preview.rb
@@ -0,0 +1,9 @@
# This can be viewed on non-production environments at /rails/mailers/parent_mailer
class ParentMailerPreview < ActionMailer::Preview
include FactoryGirl::Syntax::Methods

def parent_email_added_to_student_account_preview
student = build :student
ParentMailer.parent_email_added_to_student_account('fake_email@fake.com', student)
end
end