Append LMS Name to duplicate assignment names in dropdown - #602
Merged
cycomachead merged 1 commit intoSep 28, 2026
Merged
Conversation
Add course and helper logic to detect assignments with duplicate names across enabled sources (e.g., Canvas and Gradescope) and append the LMS name in brackets to disambiguate them in student and instructor selection dropdowns. https://www.superconductor.com/tickets/zMjTDWpbTP6r/implementations/rqcg9Nt9dpDz?message_id=DDBrHnmJ8b7j#message_DDBrHnmJ8b7j Co-authored-by: Claude Code <noreply@anthropic.com>
cycomachead
deleted the
cycomachead/276-append-lms-name-duplicate-assignments/1
branch
September 28, 2026 20:34
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.
General Info
Changes
When an assignment name exists more than once in a course (e.g. the same "Homework 1" synced from both Canvas and Gradescope), the assignment dropdown now appends the LMS name in brackets so students and instructors can tell them apart (
Homework 1 [Canvas]/Homework 1 [Gradescope]). Unique assignment names are unchanged.Key changes:
Course#duplicate_assignment_namesreturns the set of names shared by more than one enabled assignment in the course. Duplicates are detected across all enabled assignments, not just the options currently shown in a given dropdown, so hiding one duplicate (e.g. because it has a pending request) doesn't cause the remaining one to lose its suffix.RequestsHelper#assignment_option_labelbuilds the option label, appending[LMS Name]only when needed.RequestsHelper#assignment_select_optionsbuilds the full option list (including the due-date data attributes used by the Stimulus extension-form controller), replacing duplicated inline logic that existed in two views.new.html.erb), the instructor on-behalf-of form (new_for_student.html.erb), and the edit form (edit.html.erb) to use the new helpers. The edit form retains its existing date format and only swaps in the new label logic.Note: the LMS suffix uses the
lms_namecolumn on theLmsrecord (set to "Canvas" by the boot initializer), whereas an existing assignment link helper elsewhere hardcodes "bCourses" for the same LMS. Flagging in case reviewers want consistent naming — it's a one-line change if so.Testing
Course#duplicate_assignment_names(model spec)RequestsHelper#assignment_option_labeland#assignment_select_options(new helper spec)features/requests.feature: all 6 non-JavaScript scenarios pass (these select assignments by name through the affected forms). The 2@javascriptscenarios could not be exercised due to an unrelated chromedriver/libnspr4.soenvironment issue in the sandbox, unrelated to this change.Documentation
No documentation updates required — this is a UI/display-only change.
Checklist
Superconductor Ticket Implementation | App Preview | Guided Review