Skip to content

Feature/grant extension form v2#926

Open
JoeMacl wants to merge 4 commits into
doubtfire-lms:9.xfrom
JoeMacl:feature/grant-extension-form-v2
Open

Feature/grant extension form v2#926
JoeMacl wants to merge 4 commits into
doubtfire-lms:9.xfrom
JoeMacl:feature/grant-extension-form-v2

Conversation

@JoeMacl

@JoeMacl JoeMacl commented May 5, 2025

Copy link
Copy Markdown

Description

This update progresses the Staff Grant Extension feature by integrating the frontend modal with the backend API. Staff users (Admins) can now submit extension requests via the modal form, which sends user input to the /extensions endpoint.

The updated form now:

  • Connects the form to the backend API

  • Handles both successful and failed responses

  • Validates user permissions (only staff can grant extensions)

While the integration is functional, backend interaction is still in early stages. More improvements will come in a later update such as improved error handling, context-aware unit/task selection, student lookup.

To View the Feature

  • Make sure you're signed in as administrator
  • Choose any unit
  • Find the 'Grant Extension' button form next to 'Request Extension' button

For Reference:
image
Confirm the integration by checking the Network tab in DevTools for a successful POST to /staff-grant-extension with a 201 response.
image

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Submitted the Grant Extension form as an admin user.

Verified successful backend integration via a 201 response in the Network tab (POST to /staff-grant-extension).

Checked that form validation works correctly for all fields (student selection, reason, duration).

Confirmed success and error messages are displayed appropriately via snackbars.

Testing Checklist:

  • Tested in latest Chrome
  • Tested in latest Safari
  • 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

@JoeMacl JoeMacl force-pushed the feature/grant-extension-form-v2 branch from a3b44c7 to 570433a Compare May 12, 2025 07:01
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.

1 participant