learning-unlimited/ESP-Website — pull request #1076 by jmoldow (2014-02-19 04:21:29+00:00)
Title: Guardian email

Adds a feature to email guardians from the commpanel. Any query that is applied to students, can be used to send to the guardians of those students as well.

I'm potentially worried about the performance of the sendto functions. On the MIT database, it took me 12 minutes to run send_to_self_and_guardian_and_emergency() on all users. This is probably fine for now, because this feature will probably mostly be used for emailing program participants, and not all students in the database. But in a future pull request, I may try to re-architect the functions so that they take a list of users and do a single query for ContactInfos.