Open
Conversation
088c478 to
b6c301d
Compare
donny-wong
reviewed
Feb 2, 2026
Contributor
donny-wong
left a comment
There was a problem hiding this comment.
Good job. Please provide a confirmation message before deleting the instructor, as that would prevent accidental deletion. Thank you.
Contributor
Author
Good idea. |
87c2177 to
f609aba
Compare
Collaborator
Pull Request Test Coverage Report for Build 21698690120Details
💛 - Coveralls |
f609aba to
3c5699b
Compare
david-yz-liu
reviewed
Feb 4, 2026
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
- 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?
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
3c5699b to
56f9b9a
Compare
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.
Proposed Changes
We wish to allow administrators to remove instructors as easily as they are able to remove graders.
Screenshots of your changes (if applicable)
Associated documentation repository pull request (if applicable)
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]into a[x]in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
(Include any questions or comments you have regarding your changes.)