diff --git a/lms/envs/common.py b/lms/envs/common.py index 3ace69ab06..7097b4c2a0 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -5411,6 +5411,10 @@ NOTIFICATION_TYPE_ICONS = {} DEFAULT_NOTIFICATION_ICON_URL = "" NOTIFICATION_DIGEST_LOGO = DEFAULT_EMAIL_LOGO_URL +############## SELF PACED EMAIL ############## +SELF_PACED_BANNER_URL = "" +SELF_PACED_CLOUD_URL = "" + ############## NUDGE EMAILS ############### # .. setting_name: DISABLED_ORGS_FOR_PROGRAM_NUDGE # .. setting_default: [] diff --git a/openedx/core/djangoapps/schedules/resolvers.py b/openedx/core/djangoapps/schedules/resolvers.py index 40d565962b..b3dce6f054 100644 --- a/openedx/core/djangoapps/schedules/resolvers.py +++ b/openedx/core/djangoapps/schedules/resolvers.py @@ -548,6 +548,8 @@ class CourseNextSectionUpdate(PrefixedDebugLoggerMixin, RecipientResolver): 'course_id': str(course.id), 'course_ids': [str(course.id)], 'unsubscribe_url': unsubscribe_url, + 'self_paced_banner_url': settings.SELF_PACED_BANNER_URL, + 'self_paced_cloud_url': settings.SELF_PACED_CLOUD_URL, }) template_context.update(_get_upsell_information_for_schedule(user, schedule)) diff --git a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/base_body.html b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/base_body.html new file mode 100644 index 0000000000..80021696a4 --- /dev/null +++ b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/base_body.html @@ -0,0 +1,91 @@ +{% load django_markup %} +{% load i18n %} + +{% load ace %} + +{% load acetags %} + +{% get_current_language as LANGUAGE_CODE %} +{% get_current_language_bidi as LANGUAGE_BIDI %} + +{# This is preview text that is visible in the inbox view of many email clients but not visible in the actual #} +{# email itself. #} + +
+{% block preview_text %}{% endblock %} +
+ +{% for image_src in channel.tracker_image_sources %} + +{% endfor %} + +{% google_analytics_tracking_pixel %} + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/body.html b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/body.html index fd43f9933b..b4be9cdfb9 100644 --- a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/body.html +++ b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/body.html @@ -1,6 +1,8 @@ -{% extends 'ace_common/edx_ace/common/base_body.html' %} +{% extends 'schedules/edx_ace/courseupdate/email/base_body.html' %} + {% load i18n %} {% load django_markup %} +{% load static %} {% block preview_text %} {% filter force_escape %} @@ -11,38 +13,123 @@ {% endblock %} {% block content %} - +
+ +{% if route_enabled %} +{% endif %} + + + + + + + + + + + + + + + +
-

- {% blocktrans trimmed asvar tmsg %} - We hope you're enjoying {start_strong}{course_name}{end_strong}! - We want to let you know what you can look forward to in week {week_num}: - {% endblocktrans %} - {% interpolate_html tmsg start_strong=''|safe end_strong=''|safe course_name=course_name|force_escape|safe week_num=week_num|force_escape|safe %} -

    - {% for highlight in week_highlights %} -
  • {{ highlight }}
  • - {% endfor %} -
-

{% filter force_escape %} - {% blocktrans trimmed %} - With self-paced courses, you learn on your own schedule. - We encourage you to spend time with the course each week. - Your focused attention will pay off in the end! - {% endblocktrans %} + {% blocktrans %}This is a routed Account Activation email for {{ routed_profile_name }} ({{ routed_user_email }}): {{ routed_profile_name }}{% endblocktrans %} {% endfilter %} +

- - {% filter force_escape %} - {% blocktrans asvar course_cta_text %}Resume your course now{% endblocktrans %} - {% endfilter %} - {% include "ace_common/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text%} - - {% include "ace_common/edx_ace/common/upsell_cta.html"%}
+ {% trans 'Welcome to edX. It’s time for your next career move' as tmsg %}{{ tmsg | force_escape }} +
+

+ {% trans "We hope you’re enjoying Introduction to Data Science with Python!" as tmsg %}{{ tmsg | force_escape }} +

+

+ {% trans "We want to let you know what you can look forward to in week two: " as tmsg %}{{ tmsg | force_escape }} +

+
    +
  • +

    + {% trans "Learn kNN regression" as tmsg %}{{ tmsg | force_escape }} +

    +
  • +
  • +

    + {% trans "Learn linear regression" as tmsg %}{{ tmsg | force_escape }} +

    +
  • +
  • +

    + {% trans "Find out how to choose which model you want" as tmsg %}{{ tmsg | force_escape }} +

    +
  • +
+
+ {% filter force_escape %} + {% blocktrans asvar course_cta_text %}Resume your course {% endblocktrans %} + {% endfilter %} + {% include "schedules/edx_ace/courseupdate/email/return_to_course_cta.html" with course_cta_text=course_cta_text%} +
+   +
+ + + + + + + + + +
+

+ {% trans "Your focused attention will pay off in the end! " as tmsg %}{{ tmsg | force_escape }} + {% trans "With self-paced courses, you learn on your own schedule. It’s a good idea to spend time with the course each week and check in with your goals often." as tmsg %}{{ tmsg | force_escape }} +

+
+ Message Icon +
+
{% endblock %} + +{% block footer%} +{%include 'schedules/edx_ace/courseupdate/email/footer.html'%} +{% endblock%} diff --git a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/footer.html b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/footer.html new file mode 100644 index 0000000000..a7081d0bd3 --- /dev/null +++ b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/footer.html @@ -0,0 +1,195 @@ +{% load django_markup %} +{% load i18n %} +{% load ace %} +{% load acetags %} +{% load static %} + + + + {% if confirm_activation_link %} + {% endif %} + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + +
+ + {% filter force_escape %}{% blocktrans %}Go to {{ platform_name }} Home Page{% endblocktrans %}{% endfilter %} +
+ + + + + + +
+ + + + {% if social_media_urls.facebook %} + + {% endif %} + {% if social_media_urls.instagram %} + + {% endif %} + {% if social_media_urls.linkedin %} + + {% endif %} + {% if social_media_urls.twitter %} + + {% endif %} + {% if social_media_urls.reddit %} + + {% endif %} + + +
+ + {% filter force_escape %}{% blocktrans %}{{ platform_name }} on Facebook{% endblocktrans %}{% endfilter %} + + + + {% filter force_escape %}{% blocktrans %}{{ platform_name }} on Facebook{% endblocktrans %}{% endfilter %} + + + + {% filter force_escape %}{% blocktrans %}{{ platform_name }} on LinkedIn{% endblocktrans %}{% endfilter %} + + + + {% filter force_escape %}{% blocktrans %}{{ platform_name }} on Twitter{% endblocktrans %}{% endfilter %} + + + + {% filter force_escape %}{% blocktrans %}{{ platform_name }} on Reddit{% endblocktrans %}{% endfilter %} + +
+
+
+
+
+ + + + + + +
+ + + + + + +
+ + + + {% if mobile_store_urls.apple %} + + {% endif %} + + {% if mobile_store_urls.google %} + + {% endif %} + + +
+ + {% trans + + + + {% trans + +
+
+
+
+ {% if disclaimer %} + {{ disclaimer }}
+ {% endif %} + {% trans "edX is the trusted platform for education and learning" as tmsg %}{{ tmsg | force_escape }}.
+
+ © {% now "Y" %} {{ platform_name }} LLC. {% trans "All rights reserved" as tmsg %}{{ tmsg | force_escape }}.
+
+ {% if unsubscribe_link %} + + {%if unsubscribe_text%} {{unsubscribe_text}} {%else%} {% trans "Unsubscribe from these emails." as tmsg %}{{ tmsg | force_escape }} {%endif%} +
+
+ {% endif %} + {{ contact_mailing_address }} +
+
+
\ No newline at end of file diff --git a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/head.html b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/head.html index 366ada7ad9..602b11e4ae 100644 --- a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/head.html +++ b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/head.html @@ -1 +1,40 @@ -{% extends 'ace_common/edx_ace/common/base_head.html' %} +{% load django_markup %} +{% load i18n %} +{% load ace %} +{% load acetags %} +{% load static %} + + + + + +
+ + + + +
+ + + + + + +
 
+ + + + +
+ + + + +
+ + {% filter force_escape %}{% blocktrans %}Go to {{ platform_name }} Home Page{% endblocktrans %}{% endfilter %} +
+
+
 
+
+
\ No newline at end of file diff --git a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/return_to_course_cta.html b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/return_to_course_cta.html new file mode 100644 index 0000000000..a0f4f8b557 --- /dev/null +++ b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/return_to_course_cta.html @@ -0,0 +1,35 @@ +{% load i18n %} +{% load ace %} + +

+ {# email client support for style sheets is pretty spotty, so we have to inline all of these styles #} + 1 %} + href="{% with_link_tracking dashboard_url %}" + {% else %} + href="{% with_link_tracking course_url %}" + {% endif %} + {% endif %} + style=" + text-decoration: none; + color: white; + background-color: #ED5C13; + text-align: center; + vertical-align: middle; + user-select: none; + font-weight: 500; + font-size: 12px; + text-decoration-style: solid; + display: inline-flex; + flex-direction: row; + border-radius: 30.22px; + "> + {# old email clients require the use of the font tag :( #} + {{ course_cta_text }} + +

diff --git a/openedx/core/djangoapps/schedules/tests/test_resolvers.py b/openedx/core/djangoapps/schedules/tests/test_resolvers.py index a23c9dbb21..2c37608e5c 100644 --- a/openedx/core/djangoapps/schedules/tests/test_resolvers.py +++ b/openedx/core/djangoapps/schedules/tests/test_resolvers.py @@ -271,6 +271,8 @@ class TestCourseNextSectionUpdateResolver(SchedulesResolverTestMixin, ModuleStor @override_settings(CONTACT_MAILING_ADDRESS='123 Sesame Street') @override_settings(LOGO_URL_PNG='https://www.logo.png') + @override_settings(SELF_PACED_BANNER_URL='') + @override_settings(SELF_PACED_CLOUD_URL='') def test_schedule_context(self): resolver = self.create_resolver() # using this to make sure the select_related stays intact @@ -316,6 +318,8 @@ class TestCourseNextSectionUpdateResolver(SchedulesResolverTestMixin, ModuleStor 'twitter': twitter_url}, 'template_revision': 'release', 'unsubscribe_url': None, + 'self_paced_banner_url': '', + 'self_paced_cloud_url': '', 'week_highlights': ['good stuff 2'], 'week_num': 2, }