Schedules: Course Update support bulleted highlights
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"%}
|
||||
|
||||
Reference in New Issue
Block a user