feat: Group ora staff notifications (#36440)
* feat: Group ora staff notifications * fix: Revert default change for ora staff notifications * fix: update edx-ora2 version
This commit is contained in:
@@ -201,8 +201,10 @@ COURSE_NOTIFICATION_TYPES = {
|
||||
'push': False,
|
||||
'email_cadence': EmailCadence.DAILY,
|
||||
'non_editable': [],
|
||||
'content_template': _('<{p}>You have a new open response submission awaiting for review for '
|
||||
'content_template': _('<{p}>You have a new open response submission awaiting review for '
|
||||
'<{strong}>{ora_name}</{strong}></{p}>'),
|
||||
'grouped_content_template': _('<{p}>You have multiple submissions awaiting review for '
|
||||
'<{strong}>{ora_name}</{strong}></{p}>'),
|
||||
'content_context': {
|
||||
'ora_name': 'Name of ORA in course',
|
||||
},
|
||||
|
||||
@@ -106,6 +106,21 @@ class NewPostGrouper(BaseNotificationGrouper):
|
||||
}
|
||||
|
||||
|
||||
@NotificationRegistry.register('ora_staff_notification')
|
||||
class OraStaffGrouper(BaseNotificationGrouper):
|
||||
"""
|
||||
Grouper for new ora staff notifications.
|
||||
"""
|
||||
|
||||
def group(self, new_notification, old_notification):
|
||||
"""
|
||||
Groups new ora staff notifications based on the xblock ID.
|
||||
"""
|
||||
content_context = old_notification.content_context
|
||||
content_context.setdefault("grouped", True)
|
||||
return content_context
|
||||
|
||||
|
||||
def group_user_notifications(new_notification: Notification, old_notification: Notification):
|
||||
"""
|
||||
Groups user notification based on notification type and group_id
|
||||
|
||||
@@ -828,7 +828,7 @@ openedx-mongodbproxy==0.2.2
|
||||
# via -r requirements/edx/kernel.in
|
||||
optimizely-sdk==5.2.0
|
||||
# via -r requirements/edx/bundled.in
|
||||
ora2==6.14.7
|
||||
ora2==6.15.0
|
||||
# via -r requirements/edx/bundled.in
|
||||
packaging==24.2
|
||||
# via
|
||||
|
||||
@@ -1396,7 +1396,7 @@ optimizely-sdk==5.2.0
|
||||
# via
|
||||
# -r requirements/edx/doc.txt
|
||||
# -r requirements/edx/testing.txt
|
||||
ora2==6.14.7
|
||||
ora2==6.15.0
|
||||
# via
|
||||
# -r requirements/edx/doc.txt
|
||||
# -r requirements/edx/testing.txt
|
||||
|
||||
@@ -1000,7 +1000,7 @@ openedx-mongodbproxy==0.2.2
|
||||
# via -r requirements/edx/base.txt
|
||||
optimizely-sdk==5.2.0
|
||||
# via -r requirements/edx/base.txt
|
||||
ora2==6.14.7
|
||||
ora2==6.15.0
|
||||
# via -r requirements/edx/base.txt
|
||||
packaging==24.2
|
||||
# via
|
||||
|
||||
@@ -1058,7 +1058,7 @@ openedx-mongodbproxy==0.2.2
|
||||
# via -r requirements/edx/base.txt
|
||||
optimizely-sdk==5.2.0
|
||||
# via -r requirements/edx/base.txt
|
||||
ora2==6.14.7
|
||||
ora2==6.15.0
|
||||
# via -r requirements/edx/base.txt
|
||||
packaging==24.2
|
||||
# via
|
||||
|
||||
Reference in New Issue
Block a user