Skip to content

Conversation

@JoeMacl
Copy link

@JoeMacl JoeMacl commented May 19, 2025

Description

This PR builds upon the existing Staff Grant Extension modal by introducing multi-student selection support. It allows admins to grant extensions to multiple students at once, improving flexibility and efficiency in bulk extension management.

This update extends the form implemented in PR #330 and includes the following changes:

  • Replaces single-student dropdown with for multi-student selection
  • Updates the reactive form to handle an array of student_ids
  • Adds validation to ensure at least one student is selected
  • Adjusts the payload sent to the backend API to support multiple recipients

Important: You may need to manually enter the URL, as there’s currently an issue accessing units while signed in as an administrator. As a workaround, you can sign in as a student first, copy the unit URL, then sign in as an admin and paste it into the address bar.

To View the Feature

Pull the frontend code from PR #330

  • Make sure you're signed in as administrator
  • Choose any unit
  • Find the 'Grant Extension' button form in one of the students tasks

For Reference:
Confirm multiple students can be selected

image

Confirm successful 201 created response
image

Type of change

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

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
  • I have requested a review from @macite and @jakerenzella on the Pull Request

Copy link

@SahiruWithanage SahiruWithanage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Joe!

I have reviewed the PR and can confirm that selecting multiple students from the list functions correctly. Additionally, the POST request returns a 201 Created response as intended

Before merging, we should determine how this feature will interact with Pull Request #359, which also introduces multi-student selection. As this change is intended to support the “search student” functionality, it will be important to coordinate the integration of both PRs to prevent any conflicts.

Overall, the implementation is robust and straightforward to test. Please find this PR attached for your reference.

Copy link

@samindiii samindiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Joe!
Great job- I was able to select multiple students from a list and access the API through that as well! Like Sahiru mentioned the merging is going to be quite messy but I'm sure we can figure it out :)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file please

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.

4 participants