Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
notifier
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
notifier
Commits
d9362ee2
Commit
d9362ee2
authored
Mar 20, 2018
by
Cory Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "WL-1403 | suppressing digest notification for WL-sites."
This reverts commit
31c393b0
.
parent
ee7829a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
29 deletions
+17
-29
notifier/pull.py
+17
-29
No files found.
notifier/pull.py
View file @
d9362ee2
...
@@ -69,15 +69,6 @@ def _build_digest(user_content, user_info):
...
@@ -69,15 +69,6 @@ def _build_digest(user_content, user_info):
)
)
)
)
def
_should_skip_org
(
course_id
):
# TODO: Need to implement an end point in LMS to get this list.
orgs_to_skip
=
[
"WhartonOnlineProfessionalEd"
]
skip_course
=
False
for
org
in
orgs_to_skip
:
if
org
in
course_id
:
skip_course
=
True
return
skip_course
def
_build_digest_course
(
course_id
,
course_content
,
user_course_info
):
def
_build_digest_course
(
course_id
,
course_content
,
user_course_info
):
"""
"""
Transforms thread/item data from the comments service's response for a
Transforms thread/item data from the comments service's response for a
...
@@ -85,26 +76,23 @@ def _build_digest_course(course_id, course_content, user_course_info):
...
@@ -85,26 +76,23 @@ def _build_digest_course(course_id, course_content, user_course_info):
The threads returned will be filtered by a group-level access check.
The threads returned will be filtered by a group-level access check.
"""
"""
if
_should_skip_org
(
course_id
):
return
DigestCourse
(
return
DigestCourse
(
course_id
,
[])
course_id
,
else
:
[
return
DigestCourse
(
_build_digest_thread
(
thread_id
,
course_id
,
thread_content
)
course_id
,
for
thread_id
,
thread_content
in
course_content
.
iteritems
()
[
if
(
_build_digest_thread
(
thread_id
,
course_id
,
thread_content
)
# the user is allowed to "see all cohorts" in the course, or
for
thread_id
,
thread_content
in
course_content
.
iteritems
()
user_course_info
[
'see_all_cohorts'
]
or
if
(
# the user is allowed to "see all cohorts" in the course, or
# the thread is not associated with a group, or
user_course_info
[
'see_all_cohorts'
]
or
thread_content
.
get
(
'group_id'
)
is
None
or
# the thread is not associated with a group, or
# the user's cohort_id matches the thread's group_id
thread_content
.
get
(
'group_id'
)
is
None
or
user_course_info
[
'cohort_id'
]
==
thread_content
.
get
(
'group_id'
)
)
# the user's cohort_id matches the thread's group_id
]
user_course_info
[
'cohort_id'
]
==
thread_content
.
get
(
'group_id'
)
)
)
]
)
def
_build_digest_thread
(
thread_id
,
course_id
,
thread_content
):
def
_build_digest_thread
(
thread_id
,
course_id
,
thread_content
):
"""
"""
...
...
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