🐜 Fix syncing Courses with duplicate Number + Title #79
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.
A bug was recently discovered where course data was missing for courses that had identical titles and numbers, but different subjects: #76
As an example instance, in Spring 2025, MyPurdue lists
MA 41600andSTAT 41600, both titled "Probability," however Purdue.io only showsMA 41600with every CRN from both of the original courses grouped under it.The root cause is that CatalogSync caches courses indexed only by their number and title, not by their subject. This causes any courses with an identical number and title to be grouped together, even those from different subjects.
This change modifies the index to key off of subject code in addition to number and title, resolving the initial bug.
It also includes the logic needed to "move" classes that were erroneously synced with the existing logic to the correct place.