Skip to content

Add teacher to MailJet contact list on course assignment#72076

Open
bethanyaconnor wants to merge 4 commits intostagingfrom
bethany/intro-to-weblab-contact-list
Open

Add teacher to MailJet contact list on course assignment#72076
bethanyaconnor wants to merge 4 commits intostagingfrom
bethany/intro-to-weblab-contact-list

Conversation

@bethanyaconnor
Copy link
Copy Markdown
Contributor

@bethanyaconnor bethanyaconnor commented Apr 10, 2026

When a teacher assigns the new HoAI tutorial, Intro to Web Lab, to a section, they are added to a MailJet contact list via an after_save callback on the Section model.

We will use this contact list to automate a follow-up email a week or so after they assign it. Dani will be responsible for setting that up in MailJet.

I tested this locally by setting up a contact list in the development subaccount of MailJet and confirming that assigning a test course (as the real one isn't ready yet) successfully put the user in the contact list. There is a bit more abstraction here than I'd like, so I'll confirm this change when this PR and the tutorial are both live.

bethanyaconnor and others added 4 commits April 10, 2026 14:15
When a teacher assigns hoai-web-design-pilot-v2 to a section, add them
to the corresponding MailJet contact list via an after_save callback on
the Section model. The mapping from UnitGroup name to contact list is
defined in MAILJET_COURSE_ASSIGNMENT_CONTACT_LISTS for easy extension.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- In Section callback, use the existing `unit_group` method instead of
  calling UnitGroup.get_from_cache directly.
- In MailJet.create_contact_and_add_to_course_list, check that the
  contact_list_id exists before creating the contact.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bethanyaconnor bethanyaconnor marked this pull request as ready for review April 14, 2026 17:19
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.

1 participant