Feature/Extension notification system - Backend#464
Open
SahiruWithanage wants to merge 6 commits intodoubtfire-lms:9.xfrom
Open
Feature/Extension notification system - Backend#464SahiruWithanage wants to merge 6 commits intodoubtfire-lms:9.xfrom
SahiruWithanage wants to merge 6 commits intodoubtfire-lms:9.xfrom
Conversation
Enable staff to grant extensions to multiple students without formal requests. Reuse existing student extension logic through a new service for consistency. Supports flexible academic support and streamlines staff workflows. Relates to the OnTrack Staff Grant Extension design documentation.
…rpolated strings This aligns the test file with the string formatting convention used in the rest of the codebase. Single quotes are preferred when string interpolation is not needed, improving consistency. Reviewed as part of peer feedback.
Linked extension_comments_api (student-requested extensions) to use the shared ExtensionService, previously set up for staff-granted extensions. This refactor ensures both student and staff extension flows use the same logic, improving consistency and reducing duplication.
Implemented backend logic to send emails to tutor and student when extensions are granted. Also enable it so the front end can use the returned information from the api to display notifications.
A comment line change made in the staff grant extension feature branch that hasn't been updated here. Changing to keep the consistency.
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Important Note:
This pull request depends on PR #463 (Staff Grant Extension Endpoint).
This pull request implements the backend notification system for the Staff Grant Extension feature in OnTrack.
When a tutor grants extensions to students through the Staff Grant Extension endpoint:
The Staff Grant Extension API also returns additional notification-related information in its response, allowing the frontend to display in-platform notifications to students if preferred.
This enhancement improves communication between staff and students and prepares the system for frontend notification display.
The functionality was tested through a new test file:
notifications_mailer_test.rb.Related project: Staff Grant Extension - Backend Notification System
Type of change
How Has This Been Tested?
The following tests have been written and run to verify correct behavior:
notifications_mailer_test.rbNote: This is backend-only work. Frontend integration for in-app notification display is tracked separately.
Checklist
If involving code
If modified config files
Folders and Files Added/Modified
Added:
app/views/notifications_mailer/extension_granted.html.erbapp/views/notifications_mailer/extension_granted.text.erbtest/mailers/notifications_mailer_test.rbModified:
app/api/staff_grant_extension_api.rbapp/mailers/notifications_mailer.rbconfig/environments/test.rbAdditional Notes