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
eb3e173d
Commit
eb3e173d
authored
Oct 25, 2017
by
Nimisha Asthagiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Schedules: Course Update support bulleted highlights
parent
d3dcca2f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
26 deletions
+15
-26
openedx/core/djangoapps/schedules/resolvers.py
+4
-4
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
No files found.
openedx/core/djangoapps/schedules/resolvers.py
View file @
eb3e173d
...
...
@@ -320,7 +320,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
...
...
@@ -333,7 +333,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
],
...
...
@@ -344,9 +344,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/courseupdate/email/body.html
View file @
eb3e173d
...
...
@@ -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 @
eb3e173d
...
...
@@ -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"%}
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