From 779cde9431202112af80bb93cd854d0d8a05c16a Mon Sep 17 00:00:00 2001 From: Ahtisham Shahid Date: Wed, 24 Jun 2026 14:57:04 +0500 Subject: [PATCH] feat: add ora reminder notification (#38298) * feat: added ora reminder notification --- .../notifications/base_notification.py | 19 ++++++++++++++++++ .../notifications/email/notification_icons.py | 1 + .../notifications/tests/test_views.py | 20 ++++++++++++++++++- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/doc.txt | 2 +- requirements/edx/testing.txt | 2 +- 7 files changed, 43 insertions(+), 5 deletions(-) diff --git a/openedx/core/djangoapps/notifications/base_notification.py b/openedx/core/djangoapps/notifications/base_notification.py index 89c61dd1ca99..4f178132aa9d 100644 --- a/openedx/core/djangoapps/notifications/base_notification.py +++ b/openedx/core/djangoapps/notifications/base_notification.py @@ -274,6 +274,25 @@ class NotificationType(TypedDict): 'filters': [FILTER_AUDIT_EXPIRED_USERS_WITH_NO_ROLE], }, + 'ora_reminder': { + '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'], + 'content_template': _('<{p}>You have <{strong}>{pending_step} to complete for assessment ' + '<{strong}>{ora_name}'), + 'content_context': { + 'ora_name': 'Name of ORA in course', + 'pending_step': 'Pending step description (e.g. "self review" or "peer reviews")', + }, + + 'filters': [FILTER_AUDIT_EXPIRED_USERS_WITH_NO_ROLE], + }, 'new_instructor_all_learners_post': { 'notification_app': 'discussion', 'name': 'new_instructor_all_learners_post', diff --git a/openedx/core/djangoapps/notifications/email/notification_icons.py b/openedx/core/djangoapps/notifications/email/notification_icons.py index 2b420d710995..4c0dbe42ac90 100644 --- a/openedx/core/djangoapps/notifications/email/notification_icons.py +++ b/openedx/core/djangoapps/notifications/email/notification_icons.py @@ -36,6 +36,7 @@ def get_icon_name_for_notification_type(cls, notification_type, default="POST_OU "course_updates": cls.NEWSPAPER, "ora_staff_notifications": cls.OPEN_RESPONSE_OUTLINE, "ora_grade_assigned": cls.OPEN_RESPONSE_OUTLINE, + "ora_reminder": cls.OPEN_RESPONSE_OUTLINE, } return notification_type_dict.get(notification_type, default) diff --git a/openedx/core/djangoapps/notifications/tests/test_views.py b/openedx/core/djangoapps/notifications/tests/test_views.py index 4622d3aec037..4ade0c2cad5f 100644 --- a/openedx/core/djangoapps/notifications/tests/test_views.py +++ b/openedx/core/djangoapps/notifications/tests/test_views.py @@ -643,11 +643,20 @@ def setUp(self): "push": False, "email_cadence": "Daily", "info": "" + }, + "ora_reminder": { + "web": True, + "email": True, + "push": False, + "email_cadence": "Daily", + "info": "Reminder notifications for learners who have pending self or peer " + "review steps in an ORA." } }, "non_editable": { "ora_grade_assigned": ["push"], + "ora_reminder": ["push"], "ora_staff_notifications": ["push"] } }, @@ -801,10 +810,19 @@ def test_if_data_is_correctly_aggregated(self): "email_cadence": "Daily", "info": "" }, + "ora_reminder": { + "web": False, + "email": False, + "push": False, + "email_cadence": "Daily", + "info": "Reminder notifications for learners who have pending self or peer " + "review steps in an ORA." + }, }, "non_editable": { - "ora_grade_assigned": ["push"] + "ora_grade_assigned": ["push"], + "ora_reminder": ["push"] } }, } diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 979f2f2b00e9..fe12d104b67a 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -871,7 +871,7 @@ openedx-forum==0.4.2 # via -r requirements/edx/kernel.in optimizely-sdk==5.4.0 # via -r requirements/edx/bundled.in -ora2==7.0.0 +ora2==7.1.0 # via -r requirements/edx/bundled.in packaging==26.2 # via diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index c2285e88323e..992fff0a1c25 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -1428,7 +1428,7 @@ optimizely-sdk==5.4.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt -ora2==7.0.0 +ora2==7.1.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index 208bfca6e57e..3d288553ae07 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -1051,7 +1051,7 @@ openedx-forum==0.4.2 # via -r requirements/edx/base.txt optimizely-sdk==5.4.0 # via -r requirements/edx/base.txt -ora2==7.0.0 +ora2==7.1.0 # via -r requirements/edx/base.txt packaging==26.2 # via diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 1a6ba8ddd9d4..0ec196af4cad 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -1091,7 +1091,7 @@ openedx-forum==0.4.2 # via -r requirements/edx/base.txt optimizely-sdk==5.4.0 # via -r requirements/edx/base.txt -ora2==7.0.0 +ora2==7.1.0 # via -r requirements/edx/base.txt packaging==26.2 # via