feat(ACT-432): add Group Community TA audience for cohorted content_reported notifications#93
Draft
pavanhalesh wants to merge 2 commits intoedx:release-ulmofrom
Conversation
…eported notifications
asharma4-sonata
left a comment
There was a problem hiding this comment.
While reviewing the Jira ticket, I noticed inconsistencies in branch names, PR titles, and commit messages. I’ve created a Confluence document to clarify the standards. Please take a moment to review it when you can -
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: Added GroupTAinCohortFilter to include Group Community TA (Group Moderator) users in content_reported notifications only when they belong to the same cohort as the reported content.
How:
Added new audience filter GroupTAinCohortFilter in notifications.
Added filter to content_reported in base_notification.py.
Updated discussion notification sender to pass cohort_for_group_tas (from thread group_id) into audience_filters.
Testing (devstack): UI blocked due to Discussion/MongoDB hostname issue, so validated via Django shell:
Cohort A → returns group_ta_a
Cohort B → returns group_ta_b
Empty cohort list → []
Negative: removing group_ta_a from Cohort A makes filter return [], adding back restores.
Files changed:
openedx/core/djangoapps/notifications/audience_filters.py
openedx/core/djangoapps/notifications/base_notification.py
lms/djangoapps/discussion/rest_api/discussions_notifications.py
@asharma4-sonata please review this