icssc / AntAlmanac

A course exploration and scheduling tool for UCI Anteaters
https://antalmanac.com
MIT License
54 stars 64 forks source link

Fix the duplicate calendar events bug #818

Closed JacE070 closed 9 months ago

JacE070 commented 9 months ago

Summary

This change fixes the bug caused by looping over events' location.days when the calendarizeHelper has already returned events for each day. For example, class A occurs every MWF, the calendarizeHelper returns (event for Monday) -> {..., location: {..., days: "MWF"}}, also events for Wednesday and Friday with the same location field. Therefore, we will finally get 3*3=9 calendar events. Finals are also added repetitively.

Test Plan

Passed the vite test. Also tested manually.

Issues

Closes https://github.com/icssc/AntAlmanac/issues/816