Feature/Add Staff Grant Extension endpoint #463
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
This pull request implements the Staff Grant Extension backend feature for OnTrack.
It introduces a new API endpoint that allows staff members to grant extensions to students directly — even when no formal extension request exists. This supports special circumstances and improves flexibility in managing assessments.
The work also involved refactoring the existing student extension flow (
extension_comments_api.rb) to use the same shared service (ExtensionService). Now, both staff- and student-initiated extension requests are handled using the same logic, ensuring consistency and reducing duplication.Related project: Staff Grant Extension (Design + Requirements Documentation)
Type of change
How Has This Been Tested?
The following tests have been written and run to verify correct behavior:
staff_grant_extension_test.rbExtensionServiceChecklist
If involving code
If modified config files
Folders and Files Added/Modified
Added:
app/api/staff_grant_extension_api.rbapp/services/extension_service.rbtest/api/staff_grant_extension_test.rbModified:
app/api/api_root.rbapp/models/unit.rbapp/api/extension_comments_api.rb