Skip to content

Conversation

@SteveDala
Copy link

@SteveDala SteveDala commented Jan 22, 2026

Description

This pull request is a complete rebase of the Staff Grant Extension (SGE) Web functionality introduced in #403. The initial feature was built on 9.x, and this PR migrates the feature to the new 10.0.x development branch.

All credit for development of the feature front end goes to @JoeMacl, @SahiruWithanage, @rashi-agrawal29, @returnMarcco, and @samindiii.

Sister branches

Run OnTrack with the latest version of these branches to recreate the environment.

Sister Pull Requests

  • thoth-tech/doubtfire-api #82: DEPENDENCY
  • doubtfire-lms/doubtfire-web #1074: Upstream version

Repo cleanup

Merging this PR should be followed by closing the following open PRs with a comment that they have been merged into 10.0.x:

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

The user interface can be navigated to as an Admin, Convenor, or Tutor. After picking a unit, select "Staff Grant Extension" from the task list (after the unit picker) in the top left.

Select a unit, then select some students (or all) to grant the extension to. Provide a reason. Then click Grant Extension.

image

Testing Checklist:

  • Tested in latest Chrome
  • Tested in latest Safari - I don't have a Mac setup
  • Tested in latest Firefox

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review on the Pull Request

samindiii and others added 30 commits January 21, 2026 08:39
…ant extension form

This commit adds the Student Search and Select feature to the Staff Grant Extension form,
enhancing the form's usability by allowing staff to search for individual students and select
multiple students for bulk extension grants. This update integrates directly with the existing
extension form backend, improving the overall user experience for staff handling large classes.

Changes include:
- Added student search input for filtering student lists.
- Implemented multi-student selection support for bulk operations.
- Improved UI components for efficient student selection.
- Integrated with the existing form backend for seamless data flow.

References:
- Related to JoeMacl's Grant Extension Form PR thoth-tech#330
- Addresses requirements for bulk extension management.
- Create new Staff Grant Extension page with two-column layout
- Left panel: Task list using FUnitTaskListComponent
- Right panel: Embedded grant extension form (copied from admin modals)
- Form is disabled until a task is selected
- Form resets after successful submission
- Accessible via /#/staff-grant-extension URL
- Add proper routing and module configuration
- Include comprehensive form validation with visual feedback
- Add blue-tinted styling for containers
- Remove old grant extension form files that were duplicating functionality
- Add character limits to staff grant extension form: reason (300 chars), notes (500 chars)
- Clean up task status card component to remove old form dependencies
- WIP commit for adding Angular UIRouter routing for the `Staff Grant Extension` feature
- add Angular UIRouter declaration for the `Staff Grant Extension` `TaskDropdown` item
- conditionally render the `Staff Grant Extension` `TaskDropdown` item based on the user's `role`
- remove test code
Remove the notes field from the staff grant extension feature as it was
not being used in the backend implementation. This simplifies the form
and payload structure by removing the unused functionality.

Changes made:
- Remove notes field from GrantExtensionPayload interface
- Remove notes form control from grant extension form
- Remove notes textarea from form template
- Remove notes field from form reset and payload creation

The feature now only includes essential fields: student_ids,
task_definition_id, weeks_requested and comment.
samindiii and others added 7 commits January 21, 2026 18:58
- Fix error handling to properly extract specific error messages from API responses
- Handle cases where error is directly a string (most common case)
- Add debugging logs to help troubleshoot error structures

Resolves issue where generic 'Error granting extensions' message was shown
instead of specific errors like 'Extensions cannot be granted beyond task deadline'
- Remove development console.log statements used for debugging error extraction
- Keep console.error for proper error logging
- Clean up code now that error handling is working correctly
This commit is a fully rebased version of the Staff Grant
extension feature frontend. It has been rebased from
9.x to 10.0.x with as few changes as possible.

Co-authored-by: @JoeMacl
Co-authored-by: @SahiruWithanage
Co-authored-by: @samindiii
Co-authored-by: @rashi-agrawal29
Co-authored-by: @returnMarcco
@SteveDala SteveDala changed the title feat/sge rebase cherry pick feat(SGE): Web Rebase to 10.0.x Jan 22, 2026
@SteveDala SteveDala marked this pull request as ready for review January 25, 2026 07:41
@SteveDala
Copy link
Author

@BrianDangDev could you please approve the test run workflows to kick off?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants