Skip to content

Ahtisham/add ora reminder notification#38298

Draft
AhtishamShahid wants to merge 2 commits intomasterfrom
ahtisham/add_ora_reminder_notification
Draft

Ahtisham/add ora reminder notification#38298
AhtishamShahid wants to merge 2 commits intomasterfrom
ahtisham/add_ora_reminder_notification

Conversation

@AhtishamShahid
Copy link
Copy Markdown
Contributor

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:

  • Adds configuration settings for controlling the frequency, delay, and batching of ORA reminder notifications in lms/envs/common.py.
  • Introduces a new notification type ora_reminder in the notification system, including its template, delivery channels (web/email), and filtering logic in openedx/core/djangoapps/notifications/base_notification.py.
  • Documents the new notification type in the notification settings documentation in openedx/core/djangoapps/notifications/docs/settings.md.
  • Adds a new WaffleFlag (ENABLE_ORA_REMINDERS) to enable or disable the ORA reminders feature in openedx/core/djangoapps/notifications/config/waffle.py.
  • Associates the ora_reminder notification type with the appropriate icon in notification emails in openedx/core/djangoapps/notifications/email/notification_icons.py.

Copilot AI review requested due to automatic review settings April 7, 2026 19:17
@AhtishamShahid AhtishamShahid marked this pull request as draft April 7, 2026 19:17
@AhtishamShahid AhtishamShahid force-pushed the ahtisham/add_ora_reminder_notification branch from ac498d9 to 0634a4e Compare April 7, 2026 19:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_reminder as a new notification type (web/email) under the grading notification app.
  • Adds a new waffle flag notifications.enable_ora_reminders intended 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.

Comment on lines +278 to +286
'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'],
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +54
# .. 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__)

Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
# .. 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__)

Copilot uses AI. Check for mistakes.
Comment on lines 2352 to +2380

# .. 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.
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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.

2 participants