Skip to content

Commit fc4be51

Browse files
feanilclaude
andcommitted
refactor: drop unreachable marketing-site branches from enrollment emails
With ENABLE_MKTG_SITE removed, get_email_params() now always sets course_about_url via get_link_for_about_page(), which never returns None (it falls back to the LMS course about URL). The instructor "allowed enroll" and "add beta tester" ACE email templates branched on `course_about_url is not None`, keeping an else-branch for the old marketing-site-enabled case where course_about_url was None. Those conditionals are now always true and their else-branches are dead: - allowedenroll: "You can then enroll in {{ course_name }}." - addbetatester: "Visit {{ site_name }} to enroll in this course and begin the beta test." Collapse the always-true `course_about_url is not None` guards to the unconditional branch and delete the unreachable text (both .txt and .html variants). No behavior change for any reachable input. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 80e348b commit fc4be51

4 files changed

Lines changed: 6 additions & 27 deletions

File tree

lms/templates/instructor/edx_ace/addbetatester/email/body.html

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h1>
3131
</p>
3232

3333
{% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=display_name|default:course.display_name_with_default course_cta_url=course_url %}
34-
{% elif course_about_url is not None %}
34+
{% else %}
3535
<p style="color: rgba(0,0,0,.75);">
3636
{% filter force_escape %}
3737
{% blocktrans %}To enroll in this course and begin the beta test:{% endblocktrans %}
@@ -43,19 +43,6 @@ <h1>
4343
{% endfilter %}
4444

4545
{% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text course_cta_url=course_about_url %}
46-
{% else %}
47-
<p style="color: rgba(0,0,0,.75);">
48-
{% filter force_escape %}
49-
{% blocktrans %}To enroll in this course and begin the beta test:{% endblocktrans %}
50-
{% endfilter %}
51-
<br />
52-
</p>
53-
{% filter force_escape %}
54-
{% blocktrans asvar course_cta_text %}Visit {{ site_name }}
55-
{% endblocktrans %}
56-
{%endfilter%}
57-
58-
{% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text course_cta_url=course_url %}
5946
{% endif %}
6047

6148
<p style="color: rgba(0,0,0,.75);">

lms/templates/instructor/edx_ace/addbetatester/email/body.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
{% blocktrans %}You have been invited to be a beta tester for {{ course_name }} at {{ site_name }} by a member of the course staff.{% endblocktrans %}
44
{% if auto_enroll %}
55
{% blocktrans %}To start accessing course materials, please visit {{ course_url }}{% endblocktrans %}
6-
{% elif course_about_url is not None %}
7-
{% blocktrans %}Visit {{ course_about_url }} to enroll in this course and begin the beta test.{% endblocktrans %}
86
{% else %}
9-
{% blocktrans %}Visit {{ site_name }} to enroll in this course and begin the beta test.{% endblocktrans %}
7+
{% blocktrans %}Visit {{ course_about_url }} to enroll in this course and begin the beta test.{% endblocktrans %}
108
{% endif %}
119
----
1210
{% blocktrans %}This email was automatically sent from {{ site_name }} to {{ email_address }}{% endblocktrans %}{% endautoescape %}

lms/templates/instructor/edx_ace/allowedenroll/email/body.html

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h1>
3131
</p>
3232

3333
{% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_name course_cta_url=course_url %}
34-
{% elif course_about_url is not None %}
34+
{% else %}
3535
<p style="color: rgba(0,0,0,.75);">
3636
{% filter force_escape %}
3737
{% blocktrans %}To access this course visit it and register:{% endblocktrans %}
@@ -58,16 +58,11 @@ <h1>
5858
{# xss-lint: disable=django-blocktrans-missing-escape-filter #}
5959
{% blocktrans %}Once you have registered and activated your account, you will see {{ course_name }} listed on your dashboard.{% endblocktrans %}
6060
{% endautoescape %}
61-
{% elif course_about_url is not None %}
61+
{% else %}
6262
{% filter force_escape %}
6363
{% blocktrans %}Once you have registered and activated your account, you will be able to access this course:{% endblocktrans %}
6464
{% endfilter %}
6565
{% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_name course_cta_url=course_about_url %}
66-
{% else %}
67-
{% autoescape off %}
68-
{# xss-lint: disable=django-blocktrans-missing-escape-filter #}
69-
{% blocktrans %}You can then enroll in {{ course_name }}.{% endblocktrans %}
70-
{% endautoescape %}
7166
{% endif %}
7267
<br />
7368
</p>

lms/templates/instructor/edx_ace/allowedenroll/email/body.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
{% blocktrans %}You have been invited to join {{ course_name }} at {{ site_name }} by a member of the course staff.{% endblocktrans %}
44
{% if is_shib_course %}{% if auto_enroll %}{% blocktrans %}To access this course visit {{ course_url }} and login.{% endblocktrans %}
5-
{% elif course_about_url is not None %}
5+
{% else %}
66
{% blocktrans %}To access this course visit {{ course_about_url }} and register for this course.{% endblocktrans %}
77
{% endif %}
88
{% else %}{% blocktrans %}To finish your registration, please visit {{ registration_url }} and fill out the registration form making sure to use {{ email_address }} in the Email field.{% endblocktrans %}
99
{% if auto_enroll %}{% blocktrans %}Once you have registered and activated your account, you will see {{ course_name }} listed on your dashboard.{% endblocktrans %}
10-
{% elif course_about_url is not None %}{% blocktrans %}Once you have registered and activated your account, visit {{ course_about_url }} to join this course.{% endblocktrans %}
11-
{% else %}{% blocktrans %}You can then enroll in {{ course_name }}.{% endblocktrans %}
10+
{% else %}{% blocktrans %}Once you have registered and activated your account, visit {{ course_about_url }} to join this course.{% endblocktrans %}
1211
{% endif %}
1312
{% endif %}----
1413
{% blocktrans %}This email was automatically sent from {{ site_name }} to {{ email_address }}{% endblocktrans %}{% endautoescape %}

0 commit comments

Comments
 (0)