Merged
Conversation
* 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
approved these changes
Feb 9, 2026
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.
Pull request for version 2.9.3