Skip to content

Tenant-branded card frame for invite and course-messages emails - #111

Merged
AliAlfaifi merged 1 commit into
open-release/teak.nelpfrom
feat/tenant-branded-ace-emails
Sep 16, 2026
Merged

AliAlfaifi merged 1 commit into
open-release/teak.nelpfrom
feat/tenant-branded-ace-emails

Conversation

@AliAlfaifi

Copy link
Copy Markdown

Summary

Redesigns two learner emails — the instructor enrolment invite (enrollenrolled, allowedenroll) and the bulk "course messages" email (bulkemail) — as a centred card: tenant logo at the top, greeting, bold title, course name in #1B8354, a #1B8354 CTA button, the stock opt-out lines, and a footer "All rights reserved to © ". Every other edx-ace email keeps the stock frame.

How it works

  • New frame ace_common/edx_ace/common/fx_base_body.html + CTA partial fx_cta.html; the three leaf body.html files extend the new frame (they shadow core by template name through comprehensive theming). Stock base_body.html / return_to_course_cta.html are untouched.
  • Tenant values come from eox-tenant's {% load ednx %} tags (tenant_get_value, get_lms_root_url), i.e. from the tenant-patched settings, so they resolve in both the web-request path (invites) and the Celery path (bulk email).
  • Logo: lms_configs.logo_image_url (the theme-editor logo) when it is absolute and not SVG — mail clients do not render SVG — with root-relative values prefixed by the tenant root; otherwise the platform logo.
  • Name: lms_configs.PLATFORM_NAME, the same key the stock templates use (measured: set on 533/536 tenants, Arabic wins where both languages exist).
  • The bulk opt-out block is byte-identical to the stock template so its existing translations apply.
  • plugin.py: an IS_FILE_RENDERED hook keeps Tutor's Jinja pass off these Django templates (and .mo files) locally; production clones this repo raw (PICASSO_THEME_DIRS), where Jinja never runs — so no {% raw %} anywhere.
  • Five new msgids in conf/locale/{ar,en,fr} with recompiled .mo (the image build compiles catalogs before copying themes, so the committed .mo is what runs).

Coverage (prod, 2026-09-16)

  • Invites: 517 of 536 tenants (those on indigo); the 19 tenants on nelp-edx-theme-bragi keep the stock invite.
  • Bulk email: requires one DB row — theming_sitetheme(site_id=1, theme_dir_name='indigo') — because the Celery path resolves the global site's SiteTheme (none today → DEFAULT_SITE_THEME = nelp-edx-theme). Only the core CurrentSiteThemeMiddleware used by emulate_http_request reads that row; web/Studio requests use eox-theming and ignore it.
  • Logo: 335 tenants have logo_image_url; 88 of those are SVG and fall back to the platform logo until a PNG/JPG is uploaded.

Verification

  • Rendered all three templates in ar and en (plus logo/name edge cases, 14 variants) inside overhangio/openedx:20.0.5-indigo with the Tutor production settings: no template errors, RTL/LTR correct, frame marker id="fx-email-frame" present, translations resolved.
  • tutor config save copies the templates and .mo byte-for-byte (verbatim-copy check).
  • To verify on stage after deploy: send an invite and a course message on an indigo tenant and look for id="fx-email-frame" in the raw source; the bulk one proves the SiteTheme row.

🤖 Generated with Claude Code

Override the edx-ace templates for the instructor enrolment invite
(enrollenrolled, allowedenroll) and the bulk course-messages email
(bulkemail) with a centred card frame: the tenant's logo
(lms_configs.logo_image_url, absolute + non-SVG, else the platform
logo), a greeting, the course name in #1B8354, a #1B8354 CTA button,
the stock opt-out lines, and a footer
"All rights reserved to <PLATFORM_NAME> © <year>".

Tenant values are read through eox-tenant's `ednx` template tags so they
resolve in both the web-request and Celery send paths. The templates are
pure Django templates: an IS_FILE_RENDERED hook keeps Tutor's Jinja pass
off them locally (prod clones the repo raw). Five new msgids are added to
the theme catalogs (ar/en/fr) and the .mo files recompiled.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@AliAlfaifi AliAlfaifi self-assigned this Sep 16, 2026
@AliAlfaifi
AliAlfaifi merged commit dfa49e0 into open-release/teak.nelp Sep 16, 2026
1 check failed
@AliAlfaifi
AliAlfaifi deleted the feat/tenant-branded-ace-emails branch September 16, 2026 16:50
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