Ahtisham/add ora reminder notification#38298
Conversation
ac498d9 to
0634a4e
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds a new Notifications “type” for Open Response Assessment (ORA) reminder messages and wires it into the existing notifications configuration/documentation surface (icons, settings docs, and a waffle flag).
Changes:
- Adds
ora_reminderas a new notification type (web/email) under thegradingnotification app. - Adds a new waffle flag
notifications.enable_ora_remindersintended to gate ORA reminders. - Introduces LMS settings for ORA reminder cadence/batching and documents the new notification key in notification settings docs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| openedx/core/djangoapps/notifications/base_notification.py | Adds ora_reminder notification type definition. |
| openedx/core/djangoapps/notifications/config/waffle.py | Adds ENABLE_ORA_REMINDERS feature flag. |
| openedx/core/djangoapps/notifications/email/notification_icons.py | Maps ora_reminder to an ORA icon for emails. |
| openedx/core/djangoapps/notifications/docs/settings.md | Documents the new ora_reminder notification key. |
| lms/envs/common.py | Adds configuration settings for reminder cadence/sweeping/batching. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'notification_app': 'grading', | ||
| 'name': 'ora_reminder', | ||
|
|
||
| 'info': 'Reminder notifications for learners who have pending self or peer review steps in an ORA.', | ||
| 'web': True, | ||
| 'email': True, | ||
| 'push': False, | ||
| 'email_cadence': EmailCadence.DAILY, | ||
| 'non_editable': ['push'], |
There was a problem hiding this comment.
Adding the new ora_reminder type will change the payload returned by the notification preferences APIs (they derive from COURSE_NOTIFICATION_TYPES). Existing tests hard-code expected responses (e.g., openedx/core/djangoapps/notifications/tests/test_views.py includes only ora_staff_notifications and ora_grade_assigned), so CI will fail unless those expectations/non_editable maps are updated to include ora_reminder.
| # .. toggle_name: notifications.enable_ora_reminders | ||
| # .. toggle_implementation: WaffleFlag | ||
| # .. toggle_default: False | ||
| # .. toggle_description: Waffle flag to enable ORA reminder notifications for learners | ||
| # who have pending self or peer review steps after submitting an ORA response. | ||
| # .. toggle_use_cases: open_edx | ||
| # .. toggle_creation_date: 2026-03-26 | ||
| # .. toggle_target_removal_date: None | ||
| # .. toggle_warning: When the flag is ON, learners will receive periodic reminders | ||
| # for incomplete peer/self review steps. | ||
| # .. toggle_tickets: None | ||
| ENABLE_ORA_REMINDERS = WaffleFlag(f'{WAFFLE_NAMESPACE}.enable_ora_reminders', __name__) | ||
|
|
There was a problem hiding this comment.
ENABLE_ORA_REMINDERS is defined here but there are no references to it anywhere else in the repository (only this definition). If this flag is meant to gate ORA reminder scheduling/sending, it should be checked at the entry point(s) that create ora_reminder notifications; otherwise this is dead configuration that will confuse operators.
| # .. toggle_name: notifications.enable_ora_reminders | |
| # .. toggle_implementation: WaffleFlag | |
| # .. toggle_default: False | |
| # .. toggle_description: Waffle flag to enable ORA reminder notifications for learners | |
| # who have pending self or peer review steps after submitting an ORA response. | |
| # .. toggle_use_cases: open_edx | |
| # .. toggle_creation_date: 2026-03-26 | |
| # .. toggle_target_removal_date: None | |
| # .. toggle_warning: When the flag is ON, learners will receive periodic reminders | |
| # for incomplete peer/self review steps. | |
| # .. toggle_tickets: None | |
| ENABLE_ORA_REMINDERS = WaffleFlag(f'{WAFFLE_NAMESPACE}.enable_ora_reminders', __name__) |
|
|
||
| # .. setting_name: ORA_REMINDER_MAX_COUNT | ||
| # .. setting_default: 3 | ||
| # .. setting_description: Maximum number of reminder notifications sent per learner per ORA | ||
| # for incomplete peer/self review steps. | ||
| ORA_REMINDER_MAX_COUNT = 3 | ||
|
|
||
| # .. setting_name: ORA_REMINDER_INTERVAL_HOURS | ||
| # .. setting_default: 48 | ||
| # .. setting_description: Number of hours between consecutive ORA reminder notifications. | ||
| ORA_REMINDER_INTERVAL_HOURS = 48 | ||
|
|
||
| # .. setting_name: ORA_REMINDER_INITIAL_DELAY_HOURS | ||
| # .. setting_default: 0 | ||
| # .. setting_description: Number of hours after ORA submission before the first reminder | ||
| # notification is sent. Set to 0 for an immediate first reminder upon submission. | ||
| ORA_REMINDER_INITIAL_DELAY_HOURS = 0 | ||
|
|
||
| # .. setting_name: ORA_REMINDER_SWEEP_INTERVAL_SECONDS | ||
| # .. setting_default: 1800 | ||
| # .. setting_description: How often (in seconds) the platform-wide ORA reminder sweeper | ||
| # task re-schedules itself. Each sweep picks up all reminders whose next_reminder_at | ||
| # has passed. Default is 1800 (30 minutes). | ||
| ORA_REMINDER_SWEEP_INTERVAL_SECONDS = 1800 | ||
|
|
||
| # .. setting_name: ORA_REMINDER_SWEEP_BATCH_SIZE | ||
| # .. setting_default: 1000 | ||
| # .. setting_description: Maximum number of ORA reminder rows processed per sweep cycle. | ||
| # If more are due, the remaining will be picked up in the next sweep. |
There was a problem hiding this comment.
These new ORA reminder settings are not referenced anywhere else in this repository (search only finds their definitions in this file). If they’re intended to be consumed by the ORA reminder implementation, consider wiring them into the corresponding tasks/services in this PR, or add a clear pointer/comment indicating where they are consumed to avoid shipping unused settings.
This pull request introduces a new notification system for Open Response Assessment (ORA) reminders, aimed at notifying learners about pending self or peer review steps. The changes add configuration options, a new notification type, a feature flag, and documentation updates to support and control these reminders.
ORA Reminder Notification System:
lms/envs/common.py.ora_reminderin the notification system, including its template, delivery channels (web/email), and filtering logic inopenedx/core/djangoapps/notifications/base_notification.py.openedx/core/djangoapps/notifications/docs/settings.md.ENABLE_ORA_REMINDERS) to enable or disable the ORA reminders feature inopenedx/core/djangoapps/notifications/config/waffle.py.ora_remindernotification type with the appropriate icon in notification emails inopenedx/core/djangoapps/notifications/email/notification_icons.py.