Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
a7c4ddfe
Commit
a7c4ddfe
authored
Oct 25, 2017
by
Nimisha Asthagiri
Committed by
GitHub
Oct 25, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16338 from edx/pacing/course-update
Schedules: Add upsell to Course Update templates
parents
8dc47f57
eb3e173d
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
89 additions
and
141 deletions
+89
-141
openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py
+2
-0
openedx/core/djangoapps/schedules/resolvers.py
+4
-4
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/common/return_to_course_cta.html
+27
-0
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/common/upsell_cta.html
+26
-0
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/common/upsell_cta.txt
+10
-0
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/body.html
+9
-22
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/body.txt
+2
-0
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day10/email/body.html
+3
-49
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day10/email/body.txt
+1
-7
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day3/email/body.html
+4
-49
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day3/email/body.txt
+1
-8
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/upgradereminder/email/body.html
+0
-2
No files found.
openedx/core/djangoapps/schedules/management/commands/tests/test_send_recurring_nudge.py
View file @
a7c4ddfe
...
...
@@ -312,6 +312,8 @@ class TestSendRecurringNudge(FilteredQueryCountMixin, CacheIsolationTestCase):
for
(
_name
,
(
_msg
,
email
),
_kwargs
)
in
mock_channel
.
deliver
.
mock_calls
:
for
template
in
attr
.
astuple
(
email
):
self
.
assertNotIn
(
"TEMPLATE WARNING"
,
template
)
self
.
assertNotIn
(
"{{"
,
template
)
self
.
assertNotIn
(
"}}"
,
template
)
def
test_user_in_course_with_verified_coursemode_receives_upsell
(
self
):
user
=
UserFactory
.
create
()
...
...
openedx/core/djangoapps/schedules/resolvers.py
View file @
a7c4ddfe
...
...
@@ -344,7 +344,7 @@ class CourseUpdateResolver(BinnedSchedulesBaseResolver):
for
schedule
in
schedules
:
enrollment
=
schedule
.
enrollment
try
:
week_
summary
=
get_course_week_summary
(
enrollment
.
course_id
,
week_num
)
week_
highlights
=
get_week_highlights
(
enrollment
.
course_id
,
week_num
)
except
CourseUpdateDoesNotExist
:
continue
...
...
@@ -357,7 +357,7 @@ class CourseUpdateResolver(BinnedSchedulesBaseResolver):
self
.
site
,
reverse
(
'course_root'
,
args
=
[
course_id_str
])
),
'week_num'
:
week_num
,
'week_
summary'
:
week_summary
,
'week_
highlights'
:
week_highlights
,
# This is used by the bulk email optout policy
'course_ids'
:
[
course_id_str
],
...
...
@@ -368,9 +368,9 @@ class CourseUpdateResolver(BinnedSchedulesBaseResolver):
@request_cached
def
get_
course_week_summary
(
course_id
,
week_num
):
def
get_
week_highlights
(
course_id
,
week_num
):
if
COURSE_UPDATE_WAFFLE_FLAG
.
is_enabled
(
course_id
):
course
=
modulestore
()
.
get_course
(
course_id
)
return
course
.
week_summary
(
week_num
)
return
course
.
highlights_for_week
(
week_num
)
else
:
raise
CourseUpdateDoesNotExist
()
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/common/return_to_course_cta.html
0 → 100644
View file @
a7c4ddfe
{% load i18n %}
<p>
{# email client support for style sheets is pretty spotty, so we have to inline all of these styles #}
<a
{%
if
course_ids
|
length
>
1 %}
href="{{ dashboard_url }}"
{% else %}
href="{{ course_url }}"
{% endif %}
style="
color: #ffffff;
text-decoration: none;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
background-color: #005686;
border-top: 12px solid #005686;
border-bottom: 12px solid #005686;
border-right: 50px solid #005686;
border-left: 50px solid #005686;
display: inline-block;
">
{# old email clients require the use of the font tag :( #}
<font
color=
"#ffffff"
><b>
{{ course_cta_text }}
</b></font>
</a>
</p>
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/common/upsell_cta.html
0 → 100644
View file @
a7c4ddfe
{% load i18n %}
{% if show_upsell %}
<p>
{% blocktrans trimmed %}
Don't miss the opportunity to highlight your new knowledge and skills by earning a verified
certificate. Upgrade by {{ user_schedule_upgrade_deadline_time }}.
{% endblocktrans %}
</p>
<p>
<a
href=
"{{ upsell_link }}"
style=
"
color: #1e8142;
text-decoration: none;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
background-color: #FFFFFF;
border: 3px solid #1e8142;
display: inline-block;
padding: 8px 65px;
"
>
<font
color=
"#1e8142"
><b>
{% trans "Upgrade Now" %}
</b></font>
</a>
</p>
{% endif %}
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/common/upsell_cta.txt
0 → 100644
View file @
a7c4ddfe
{% load i18n %}
{% if show_upsell %}
{% blocktrans trimmed %}
Don't miss the opportunity to highlight your new knowledge and skills by earning a verified
certificate. Upgrade by {{ user_schedule_upgrade_deadline_time }}.
Upgrade Now! <{{ upsell_link }}>
{% endblocktrans %}
{% endif %}
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/body.html
View file @
a7c4ddfe
...
...
@@ -20,31 +20,18 @@
<p>
{% blocktrans trimmed %}
Here is what you can look forward to learning this week:
<p>
{{ week_summary }}
</p>
{% endblocktrans %}
<ul>
{% for highlight in week_highlights %}
<li>
{{ highlight }}
</li>
{% endfor %}
</ul>
</p>
<p>
<!-- email client support for style sheets is pretty spotty, so we have to inline all of these styles -->
<a
href=
"{{ course_url }}"
style=
"
color: #ffffff;
text-decoration: none;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
background-color: #005686;
border-top: 10px solid #005686;
border-bottom: 10px solid #005686;
border-right: 16px solid #005686;
border-left: 16px solid #005686;
display: inline-block;
"
>
<!-- old email clients require the use of the font tag :( -->
<font
color=
"#ffffff"
><b>
{% trans "Resume your course now" %}
</b></font>
</a>
</p>
{% trans "Resume your course now" as course_cta_text %}
{% include "schedules/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text%}
{% include "schedules/edx_ace/common/upsell_cta.html"%}
</td>
</tr>
</table>
...
...
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/courseupdate/email/body.txt
View file @
a7c4ddfe
...
...
@@ -7,3 +7,5 @@ Here is what you can look forward to learning this week:
{{ week_summary }}
{% endblocktrans %}
{% include "schedules/edx_ace/common/upsell_cta.txt"%}
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day10/email/body.html
View file @
a7c4ddfe
...
...
@@ -35,56 +35,10 @@
{% endif %}
</p>
<p>
{# email client support for style sheets is pretty spotty, so we have to inline all of these styles #}
<a
{%
if
course_ids
|
length
>
1 %}
href="{{ dashboard_url }}"
{% else %}
href="{{ course_url }}"
{% endif %}
style="
color: #ffffff;
text-decoration: none;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
background-color: #005686;
border-top: 12px solid #005686;
border-bottom: 12px solid #005686;
border-right: 50px solid #005686;
border-left: 50px solid #005686;
display: inline-block;
">
{# old email clients require the use of the font tag :( #}
<font
color=
"#ffffff"
><b>
{% trans "Keep learning" %}
</b></font>
</a>
</p>
{% trans "Keep learning" as course_cta_text %}
{% include "schedules/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text%}
{% if show_upsell %}
<p>
{% blocktrans trimmed %}
Don't miss the opportunity to highlight your new knowledge and skills by earning a verified
certificate. Upgrade by {{ user_schedule_upgrade_deadline_time }}.
{% endblocktrans %}
</p>
<p>
<a
href=
"{{ upsell_link }}"
style=
"
color: #1e8142;
text-decoration: none;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
background-color: #FFFFFF;
border: 3px solid #1e8142;
display: inline-block;
padding: 8px 65px;
"
>
<font
color=
"#1e8142"
><b>
{% trans "Upgrade Now" %}
</b></font>
</a>
</p>
{% endif %}
{% include "schedules/edx_ace/common/upsell_cta.html"%}
</td>
</tr>
</table>
...
...
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day10/email/body.txt
View file @
a7c4ddfe
...
...
@@ -12,11 +12,5 @@
{% endblocktrans %}
{% trans "Keep learning" %} <{{course_url}}>
{% endif %}
{% if show_upsell %}
{% blocktrans trimmed %}
Don't miss the opportunity to highlight your new knowledge and skills by earning a verified
certificate. Upgrade by {{ user_schedule_upgrade_deadline_time }}.
Upgrade Now! <{{ upsell_link }}>
{% endblocktrans %}
{% endif %}
{% include "schedules/edx_ace/common/upsell_cta.txt"%}
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day3/email/body.html
View file @
a7c4ddfe
...
...
@@ -35,55 +35,10 @@
{% endif %}
</p>
<p>
{# email client support for style sheets is pretty spotty, so we have to inline all of these styles #}
<a
{%
if
course_ids
|
length
>
1 %}
href="{{ dashboard_url }}"
{% else %}
href="{{ course_url }}"
{% endif %}
style="
color: #ffffff;
text-decoration: none;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
background-color: #005686;
border-top: 12px solid #005686;
border-bottom: 12px solid #005686;
border-right: 50px solid #005686;
border-left: 50px solid #005686;
display: inline-block;
">
{# old email clients require the use of the font tag :( #}
<font
color=
"#ffffff"
><b>
{% trans "Start learning now" %}
</b></font>
</a>
</p>
{% if show_upsell %}
<p>
{% blocktrans trimmed %}
Don't miss the opportunity to highlight your new knowledge and skills by earning a verified
certificate. Upgrade by {{ user_schedule_upgrade_deadline_time }}.
{% endblocktrans %}
</p>
<p>
<a
href=
"{{ upsell_link }}"
style=
"
color: #1e8142;
text-decoration: none;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
background-color: #FFFFFF;
border: 3px solid #1e8142;
display: inline-block;
padding: 8px 65px;
"
>
<font
color=
"#1e8142"
><b>
{% trans "Upgrade Now" %}
</b></font>
</a>
</p>
{% endif %}
{% trans "Start learning now" as course_cta_text %}
{% include "schedules/edx_ace/common/return_to_course_cta.html" with course_cta_text=course_cta_text%}
{% include "schedules/edx_ace/common/upsell_cta.html"%}
</td>
</tr>
</table>
...
...
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/recurringnudge_day3/email/body.txt
View file @
a7c4ddfe
...
...
@@ -16,11 +16,4 @@
{% trans "Start learning now" %} <{{ course_url }}>
{% endif %}
{% if show_upsell %}
{% blocktrans trimmed %}
Don't miss the opportunity to highlight your new knowledge and skills by earning a verified
certificate. Upgrade by {{ user_schedule_upgrade_deadline_time }}.
Upgrade Now! <{{ upsell_link }}>
{% endblocktrans %}
{% endif %}
{% include "schedules/edx_ace/common/upsell_cta.txt"%}
openedx/core/djangoapps/schedules/templates/schedules/edx_ace/upgradereminder/email/body.html
View file @
a7c4ddfe
...
...
@@ -20,8 +20,6 @@
Upgrade by {{ user_schedule_upgrade_deadline_time }}.
{% endblocktrans %}
{% endif %}
{% blocktrans trimmed %}
{% endblocktrans %}
{% endblock %}
{% block content %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment