diff --git a/openedx/core/djangoapps/schedules/tasks.py b/openedx/core/djangoapps/schedules/tasks.py index 1a26ad14c7..d878a3454d 100644 --- a/openedx/core/djangoapps/schedules/tasks.py +++ b/openedx/core/djangoapps/schedules/tasks.py @@ -232,8 +232,14 @@ def _upgrade_reminder_schedules_for_bin(site, current_datetime, target_datetime, 'student_name': user.profile.name, 'user_personal_address': user.profile.name if user.profile.name else user.username, - 'course_name': first_schedule.enrollment.course.display_name, - 'course_url': absolute_url(site, reverse('course_root', args=[str(first_schedule.enrollment.course_id)])), + 'course_links': [ + { + 'url': absolute_url(site, reverse('course_root', args=[str(s.enrollment.course_id)])), + 'name': s.enrollment.course.display_name + } for s in user_schedules + ], + + 'first_course_name': first_schedule.enrollment.course.display_name, # This is used by the bulk email optout policy 'course_ids': course_id_strs, diff --git a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/upgradereminder/email/body.html b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/upgradereminder/email/body.html index 5c21e314e8..32d1762709 100644 --- a/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/upgradereminder/email/body.html +++ b/openedx/core/djangoapps/schedules/templates/schedules/edx_ace/upgradereminder/email/body.html @@ -3,11 +3,22 @@ {% load static %} {% block preview_text %} - {% blocktrans trimmed %} - We hope you are enjoying learning with us so far in {{ course_name }}! A verified certificate - will allow you to highlight your new knowledge and skills. It's official, and easily shareable. + {% if course_ids|length > 1 %} + {% blocktrans trimmed %} + We hope you are enjoying learning with us so far on {{ platform_name }}! A verified certificate + will allow you to highlight your new knowledge and skills. It's official, and easily shareable. - Upgrade by {{ user_schedule_upgrade_deadline_time }}. + Upgrade by {{ user_schedule_upgrade_deadline_time }}. + {% endblocktrans %} + {% else %} + {% blocktrans trimmed %} + We hope you are enjoying learning with us so far in {{ first_course_name }}! A verified certificate + will allow you to highlight your new knowledge and skills. It's official, and easily shareable. + + Upgrade by {{ user_schedule_upgrade_deadline_time }}. + {% endblocktrans %} + {% endif %} + {% blocktrans trimmed %} {% endblocktrans %} {% endblock %} @@ -18,11 +29,19 @@
- {% blocktrans trimmed %} - We hope you are enjoying learning with us so far in {{ course_name }}! A - verified certificate will allow you to highlight your new knowledge and skills. It's official, - and easily shareable. - {% endblocktrans %} + {% if course_ids|length > 1 %} + {% blocktrans trimmed %} + We hope you are enjoying learning with us so far on {{ platform_name }}! A + verified certificate will allow you to highlight your new knowledge and skills. It's official, + and easily shareable. + {% endblocktrans %} + {% else %} + {% blocktrans trimmed %} + We hope you are enjoying learning with us so far in {{ first_course_name }}! A + verified certificate will allow you to highlight your new knowledge and skills. It's official, + and easily shareable. + {% endblocktrans %} + {% endif %}
{% blocktrans trimmed %} @@ -30,27 +49,39 @@ {% endblocktrans %}
- -