Skip to content

v2.9.3#7821

Merged
david-yz-liu merged 9 commits intoreleasefrom
v2.9.3
Feb 9, 2026
Merged

v2.9.3#7821
david-yz-liu merged 9 commits intoreleasefrom
v2.9.3

Conversation

@Naragod
Copy link
Contributor

@Naragod Naragod commented Feb 6, 2026

Pull request for version 2.9.3

lizzie-liu and others added 8 commits February 8, 2026 22:31
* Made the URL not render as a link
* Added copy functionality
* TICKET-578: Add destroy action for instructors

Add the ability for administrators to remove instructors from a course.

- Add destroy route for instructors resource
- Add destroy action to InstructorsController with error handling
- Add destroy? policy rule restricted to admin users
- Add dependent declarations to Instructor model for safe deletion
  (nullify annotations, restrict on notes, destroy tags/split_pdf_logs)
- Add i18n flash messages for destroy success/error/restricted

* TICKET-578: Add remove button to instructor table for admins

- Add trash icon to instructor table, visible only to admin users
- Add removeInstructor method that sends DELETE and refreshes table
- Pass is_admin prop from view based on current_user.admin_user?

* TICKET-578: Add tests for instructor destroy

Controller specs:
- Unauthorized (non-admin) user gets 403
- Destroy failure returns bad_request with error flash
- Instructor with notes is restricted (conflict)
- Successful deletion with cascade checks (annotations nullified, tags destroyed)

Policy specs:
- End user is denied destroy access
- Admin user is allowed destroy access

Frontend specs:
- Remove button visible when is_admin is true
- Remove button hidden when is_admin is false or unset
- DELETE request sent to correct endpoint on click

* TICKET-578: Add changelog entry

* TICKET-578: Add confirmation dialog before instructor removal

* TICKET-578: Add tests for confirmation dialog

* TICKET-578: Change tags and split_pdf_logs to restrict_with_exception
@david-yz-liu david-yz-liu merged commit 4dad713 into release Feb 9, 2026
7 checks passed
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