Skip to content

feat: Add notify all learners option for discussion post #36922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 27, 2025

Conversation

hassan-raza-1
Copy link
Contributor

@hassan-raza-1 hassan-raza-1 commented Jun 17, 2025

Description

This PR introduces a new notification type, new_instructor_all_learners_post, which enables course staff, course admins, discussion moderators, and discussion admins to create discussion or question posts that notify all learners. This functionality is controlled by the notifications.enable_post_notify_all_learners waffle flag, which must be enabled for the course. Web notifications are enabled by default for this notification type.

Supporting ticket

https://2u-internal.atlassian.net/browse/INF-1917

Testing instructions

Please provide detailed step-by-step instructions for testing this change.

Deadline

"None" if there's no rush, or provide a specific date or event (and reason) if there is one.

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
  • If your database migration can't be rolled back easily.

@hassan-raza-1 hassan-raza-1 force-pushed the hraza/INF-1917 branch 2 times, most recently from d67499f to 618c1a6 Compare June 18, 2025 12:29
},
'email_template': '',
'filters': [FILTER_AUDIT_EXPIRED_USERS_WITH_NO_ROLE],
'waffle_flag': ENABLE_NOTIFY_ALL_LEARNERS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AhtishamShahid Need your comments on adding waffle_flag attribute. As it is for temporary usage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visible_to setting is required here as this notification is not for all users , and waffle_flag should be removed because waffle is globally available and can be accessed from anywhere .

@@ -190,29 +190,47 @@ def test_not_authenticated(self):
"""

@ddt.data(
('new_question_post',),
('new_discussion_post',),
# (notification_type, notify_all_learners, waffle_flag_enabled)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this commented line

@hassan-raza-1 hassan-raza-1 merged commit 8fac3bc into master Jun 27, 2025
49 checks passed
@hassan-raza-1 hassan-raza-1 deleted the hraza/INF-1917 branch June 27, 2025 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants