Commit a3a3146
authored
🐜 Fix syncing Courses with duplicate Number + Title (#79)
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 41600` and
`STAT 41600`, both titled "Probability," however Purdue.io only shows
`MA 41600` with 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.1 parent cc07773 commit a3a3146
1 file changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
374 | 375 | | |
375 | 376 | | |
376 | 377 | | |
| 378 | + | |
377 | 379 | | |
378 | 380 | | |
379 | 381 | | |
| |||
386 | 388 | | |
387 | 389 | | |
388 | 390 | | |
| 391 | + | |
389 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
390 | 404 | | |
391 | 405 | | |
392 | 406 | | |
| |||
438 | 452 | | |
439 | 453 | | |
440 | 454 | | |
441 | | - | |
| 455 | + | |
| 456 | + | |
442 | 457 | | |
443 | 458 | | |
444 | 459 | | |
| |||
0 commit comments