Feature/Add Staff Grant Extension endpoint#463
Open
SahiruWithanage wants to merge 4 commits intodoubtfire-lms:9.xfrom
Open
Feature/Add Staff Grant Extension endpoint#463SahiruWithanage wants to merge 4 commits intodoubtfire-lms:9.xfrom
SahiruWithanage wants to merge 4 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.
15 tasks
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
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