From a26a6b83d582466ab7fce194971974ae19e5c28e Mon Sep 17 00:00:00 2001 From: SaadYousaf Date: Fri, 13 May 2022 15:01:19 +0500 Subject: [PATCH] refactor: remove temporary logs and fix email styling for reported content. --- lms/djangoapps/discussion/signals/handlers.py | 1 - lms/djangoapps/discussion/tasks.py | 2 -- .../reportedcontentnotification/email/body.html | 13 +++++-------- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/lms/djangoapps/discussion/signals/handlers.py b/lms/djangoapps/discussion/signals/handlers.py index 2f806b51be..e34e507a5f 100644 --- a/lms/djangoapps/discussion/signals/handlers.py +++ b/lms/djangoapps/discussion/signals/handlers.py @@ -124,5 +124,4 @@ def send_message(comment, site): # lint-amnesty, pylint: disable=missing-functi def send_message_for_reported_content(user, post, site, sender): # lint-amnesty, pylint: disable=missing-function-docstring context = create_message_context_for_reported_content(user, post, site, sender) - log.info('Reported content email notification task prepared.') tasks.send_ace_message_for_reported_content.apply_async(args=[context], countdown=120) diff --git a/lms/djangoapps/discussion/tasks.py b/lms/djangoapps/discussion/tasks.py index 7538c2900d..1f00f8111f 100644 --- a/lms/djangoapps/discussion/tasks.py +++ b/lms/djangoapps/discussion/tasks.py @@ -93,7 +93,6 @@ def send_ace_message(context): # lint-amnesty, pylint: disable=missing-function @shared_task(base=LoggedTask) @set_code_owner_attribute def send_ace_message_for_reported_content(context): # lint-amnesty, pylint: disable=missing-function-docstring - log.info('Reported content email notification task started.') context['course_id'] = CourseKey.from_string(context['course_id']) context['course_name'] = modulestore().get_course(context['course_id']).display_name @@ -114,7 +113,6 @@ def send_ace_message_for_reported_content(context): # lint-amnesty, pylint: dis log.info(f'Sending forum reported content email notification with context {message_context}') ace.send(message) # TODO: add tracking for reported content email - log.info('Reported content email notification task completed.') def _track_notification_sent(message, context): diff --git a/lms/djangoapps/discussion/templates/discussion/edx_ace/reportedcontentnotification/email/body.html b/lms/djangoapps/discussion/templates/discussion/edx_ace/reportedcontentnotification/email/body.html index fd10cbcbc1..2ffba413a2 100644 --- a/lms/djangoapps/discussion/templates/discussion/edx_ace/reportedcontentnotification/email/body.html +++ b/lms/djangoapps/discussion/templates/discussion/edx_ace/reportedcontentnotification/email/body.html @@ -15,14 +15,11 @@ {% endfilter %} {% interpolate_html replied_to_text start_tag=''|safe end_tag=''|safe %} -
- You are receiving this email because the following {{ content_type }} was reported for review - Title - {{ comment_body }} -
+ +

You are receiving this email because the following {{ content_type }} was reported for review

+

Title

+
+ {{ comment_body }} {% filter force_escape %} {% blocktrans asvar course_cta_text %}Go to Discussion{% endblocktrans %}