From b172a2a68c2d8c0412ed1371c2674ab9c9f89d8b Mon Sep 17 00:00:00 2001
From: Zainab Amir
Date: Tue, 28 Jan 2020 15:38:19 +0500
Subject: [PATCH] Enable course updates for instructor led courses (#22422)
Currently there is no option to schedule bulk emails to be sent
out at a specific time for instructor led courses. It would reduce
the effort required to create an engaging course if instructor led
course teams had the option to turn on weekly highlight emails as
well.
PROD-575
---
cms/static/js/views/pages/course_outline.js | 2 +-
cms/templates/js/course-outline.underscore | 2 +-
.../commands/tests/test_send_course_update.py | 59 ++++++++++++-----
.../djangoapps/schedules/message_types.py | 8 ++-
.../core/djangoapps/schedules/resolvers.py | 24 ++++++-
openedx/core/djangoapps/schedules/signals.py | 8 +--
.../instructorledcourseupdate/email/body.html | 45 +++++++++++++
.../instructorledcourseupdate/email/body.txt | 17 +++++
.../email/from_name.txt | 3 +
.../instructorledcourseupdate/email/head.html | 1 +
.../email/subject.txt | 5 ++
.../schedules/tests/test_resolvers.py | 2 +-
.../schedules/tests/test_signals.py | 64 +++++++++++++------
13 files changed, 197 insertions(+), 43 deletions(-)
create mode 100644 openedx/core/djangoapps/schedules/templates/schedules/edx_ace/instructorledcourseupdate/email/body.html
create mode 100644 openedx/core/djangoapps/schedules/templates/schedules/edx_ace/instructorledcourseupdate/email/body.txt
create mode 100644 openedx/core/djangoapps/schedules/templates/schedules/edx_ace/instructorledcourseupdate/email/from_name.txt
create mode 100644 openedx/core/djangoapps/schedules/templates/schedules/edx_ace/instructorledcourseupdate/email/head.html
create mode 100644 openedx/core/djangoapps/schedules/templates/schedules/edx_ace/instructorledcourseupdate/email/subject.txt
diff --git a/cms/static/js/views/pages/course_outline.js b/cms/static/js/views/pages/course_outline.js
index 00335e92a3..cd86d63997 100644
--- a/cms/static/js/views/pages/course_outline.js
+++ b/cms/static/js/views/pages/course_outline.js
@@ -82,7 +82,7 @@ define([
}
/* globals course */
- if (this.model.get('highlights_enabled') && course.get('self_paced')) {
+ if (this.model.get('highlights_enabled')) {
this.highlightsEnableView = new CourseHighlightsEnableView({
el: this.$('.status-highlights-enabled'),
model: this.model
diff --git a/cms/templates/js/course-outline.underscore b/cms/templates/js/course-outline.underscore
index ac9fb06e21..e41860960e 100644
--- a/cms/templates/js/course-outline.underscore
+++ b/cms/templates/js/course-outline.underscore
@@ -212,7 +212,7 @@ if (is_proctored_exam) {
<% } %>
- <% if (xblockInfo.get('highlights_enabled') && course.get('self_paced') && xblockInfo.isChapter()) { %>
+ <% if (xblockInfo.get('highlights_enabled') && xblockInfo.isChapter()) { %>
<% var number_of_highlights = (xblockInfo.get('highlights') || []).length; %>