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
89e51ecc
Commit
89e51ecc
authored
May 05, 2015
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support ability to send all unread notifications in digests
parent
27100c03
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
common/djangoapps/student/management/commands/force_send_notification_digest.py
+9
-0
lms/envs/aws.py
+4
-0
lms/envs/common.py
+1
-0
No files found.
common/djangoapps/student/management/commands/force_send_notification_digest.py
View file @
89e51ecc
...
@@ -77,7 +77,11 @@ class Command(BaseCommand):
...
@@ -77,7 +77,11 @@ class Command(BaseCommand):
"""
"""
Sends the daily digest.
Sends the daily digest.
"""
"""
if
const
.
NOTIFICATION_DIGEST_SEND_TIMEFILTERED
:
from_timestamp
=
datetime
.
datetime
.
now
(
pytz
.
UTC
)
-
datetime
.
timedelta
(
days
=
1
)
from_timestamp
=
datetime
.
datetime
.
now
(
pytz
.
UTC
)
-
datetime
.
timedelta
(
days
=
1
)
else
:
from_timestamp
=
None
to_timestamp
=
datetime
.
datetime
.
now
(
pytz
.
UTC
)
to_timestamp
=
datetime
.
datetime
.
now
(
pytz
.
UTC
)
preference_name
=
const
.
NOTIFICATION_DAILY_DIGEST_PREFERENCE_NAME
preference_name
=
const
.
NOTIFICATION_DAILY_DIGEST_PREFERENCE_NAME
subject
=
const
.
NOTIFICATION_DAILY_DIGEST_SUBJECT
subject
=
const
.
NOTIFICATION_DAILY_DIGEST_SUBJECT
...
@@ -95,7 +99,12 @@ class Command(BaseCommand):
...
@@ -95,7 +99,12 @@ class Command(BaseCommand):
"""
"""
Sends the weekly digest.
Sends the weekly digest.
"""
"""
if
const
.
NOTIFICATION_DIGEST_SEND_TIMEFILTERED
:
from_timestamp
=
datetime
.
datetime
.
now
(
pytz
.
UTC
)
-
datetime
.
timedelta
(
days
=
7
)
from_timestamp
=
datetime
.
datetime
.
now
(
pytz
.
UTC
)
-
datetime
.
timedelta
(
days
=
7
)
else
:
from_timestamp
=
None
to_timestamp
=
datetime
.
datetime
.
now
(
pytz
.
UTC
)
to_timestamp
=
datetime
.
datetime
.
now
(
pytz
.
UTC
)
preference_name
=
const
.
NOTIFICATION_WEEKLY_DIGEST_PREFERENCE_NAME
preference_name
=
const
.
NOTIFICATION_WEEKLY_DIGEST_PREFERENCE_NAME
subject
=
const
.
NOTIFICATION_WEEKLY_DIGEST_SUBJECT
subject
=
const
.
NOTIFICATION_WEEKLY_DIGEST_SUBJECT
...
...
lms/envs/aws.py
View file @
89e51ecc
...
@@ -606,5 +606,9 @@ NOTIFICATION_EMAIL_CLICK_LINK_ROOT = ENV_TOKENS.get(
...
@@ -606,5 +606,9 @@ NOTIFICATION_EMAIL_CLICK_LINK_ROOT = ENV_TOKENS.get(
'NOTIFICATION_EMAIL_CLICK_LINK_ROOT'
,
'NOTIFICATION_EMAIL_CLICK_LINK_ROOT'
,
NOTIFICATION_EMAIL_CLICK_LINK_ROOT
NOTIFICATION_EMAIL_CLICK_LINK_ROOT
)
)
NOTIFICATION_DIGEST_SEND_TIMEFILTERED
=
ENV_TOKENS
.
get
(
'NOTIFICATION_DIGEST_SEND_TIMEFILTERED'
,
NOTIFICATION_DIGEST_SEND_TIMEFILTERED
)
XBLOCK_SETTINGS
=
ENV_TOKENS
.
get
(
'XBLOCK_SETTINGS'
,
{})
XBLOCK_SETTINGS
=
ENV_TOKENS
.
get
(
'XBLOCK_SETTINGS'
,
{})
lms/envs/common.py
View file @
89e51ecc
...
@@ -2105,6 +2105,7 @@ NOTIFICATION_WEEKLY_DIGEST_SUBJECT = "Your unread notifications for '{display_na
...
@@ -2105,6 +2105,7 @@ NOTIFICATION_WEEKLY_DIGEST_SUBJECT = "Your unread notifications for '{display_na
NOTIFICATION_BRANDED_DEFAULT_LOGO
=
'edx_notifications/img/edx-openedx-logo-tag.png'
NOTIFICATION_BRANDED_DEFAULT_LOGO
=
'edx_notifications/img/edx-openedx-logo-tag.png'
NOTIFICATION_EMAIL_FROM_ADDRESS
=
''
NOTIFICATION_EMAIL_FROM_ADDRESS
=
''
NOTIFICATION_EMAIL_CLICK_LINK_ROOT
=
'http://localhost'
NOTIFICATION_EMAIL_CLICK_LINK_ROOT
=
'http://localhost'
NOTIFICATION_DIGEST_SEND_TIMEFILTERED
=
True
# Country code overrides
# Country code overrides
# Used by django-countries
# Used by django-countries
...
...
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