Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
e6647c84
Commit
e6647c84
authored
Sep 20, 2017
by
Asad Azam
Committed by
AsadAzam
Sep 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed incorrect commenter identification
parent
060c174e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
4 deletions
+5
-4
course_discovery/apps/publisher/templates/publisher/email/comment.html
+1
-1
course_discovery/apps/publisher/templates/publisher/email/comment.txt
+1
-1
course_discovery/apps/publisher_comments/emails.py
+1
-1
course_discovery/apps/publisher_comments/tests/test_emails.py
+2
-1
No files found.
course_discovery/apps/publisher/templates/publisher/email/comment.html
View file @
e6647c84
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<!-- Message Body -->
<!-- Message Body -->
<p>
<p>
{% blocktrans with date=comment_date|date:'m/d/y' time=comment_date.time trimmed %}
{% blocktrans with date=comment_date|date:'m/d/y' time=comment_date.time trimmed %}
The {{ team
_name }} made the following comment on {{ course_name }} on {{ date }} at {{ time }}
{{ user
_name }} made the following comment on {{ course_name }} on {{ date }} at {{ time }}
{% endblocktrans %}
{% endblocktrans %}
</p>
</p>
<p
style=
"font-style: italic;"
>
<p
style=
"font-style: italic;"
>
...
...
course_discovery/apps/publisher/templates/publisher/email/comment.txt
View file @
e6647c84
{% load i18n %}
{% load i18n %}
{% blocktrans with date=comment_date|date:'m/d/y' time=comment_date.time trimmed %}
{% blocktrans with date=comment_date|date:'m/d/y' time=comment_date.time trimmed %}
The {{ team
_name }} made the following comment on {{ course_name }} {{ date }} at {{ time }}.
{{ user
_name }} made the following comment on {{ course_name }} {{ date }} at {{ time }}.
{% endblocktrans %}
{% endblocktrans %}
{{ comment_message }}
{{ comment_message }}
...
...
course_discovery/apps/publisher_comments/emails.py
View file @
e6647c84
...
@@ -72,7 +72,7 @@ def send_email_for_comment(comment, created=False):
...
@@ -72,7 +72,7 @@ def send_email_for_comment(comment, created=False):
context
=
{
context
=
{
'comment_message'
:
comment
.
comment
,
'comment_message'
:
comment
.
comment
,
'
team_name'
:
'course team'
if
comment
.
user
==
course
.
course_team_admin
else
'marketing team'
,
'
user_name'
:
comment
.
user
.
username
,
'course_name'
:
course_name
,
'course_name'
:
course_name
,
'comment_date'
:
comment_date
,
'comment_date'
:
comment_date
,
'page_url'
:
'https://{host}{path}'
.
format
(
host
=
comment
.
site
.
domain
.
strip
(
'/'
),
path
=
object_path
)
'page_url'
:
'https://{host}{path}'
.
format
(
host
=
comment
.
site
.
domain
.
strip
(
'/'
),
path
=
object_path
)
...
...
course_discovery/apps/publisher_comments/tests/test_emails.py
View file @
e6647c84
...
@@ -135,7 +135,8 @@ class CommentsEmailTests(SiteMixin, TestCase):
...
@@ -135,7 +135,8 @@ class CommentsEmailTests(SiteMixin, TestCase):
else
:
else
:
course_name
=
content_object
.
title
course_name
=
content_object
.
title
expected
=
'The marketing team made the following comment on {course_name}'
.
format
(
course_name
=
course_name
)
expected
=
'{username} made the following comment on {course_name}'
.
format
(
username
=
comment
.
user
.
username
,
course_name
=
course_name
)
self
.
assertIn
(
expected
,
body
)
self
.
assertIn
(
expected
,
body
)
page_url
=
'https://{host}{path}'
.
format
(
host
=
comment
.
site
.
domain
.
strip
(
'/'
),
path
=
object_path
)
page_url
=
'https://{host}{path}'
.
format
(
host
=
comment
.
site
.
domain
.
strip
(
'/'
),
path
=
object_path
)
self
.
assertIn
(
comment
.
comment
,
body
)
self
.
assertIn
(
comment
.
comment
,
body
)
...
...
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