nusmodifications / nusmods

🏫 Official course planning platform for National University of Singapore.
https://nusmods.com
MIT License
557 stars 270 forks source link

Scraper should issue warning when an individual lesson slot has duplicated weeks #3687

Open kokrui opened 3 months ago

kokrui commented 3 months ago

In https://github.com/nusmodifications/nusmods/issues/3648, we notice that this year's data for ST2334 has individual lecture lesson slots (timetable entries) with duplicated weeks.

"weeks": [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13],

I presume that the intention is to create 2 lecture slots (which they did, but this bug remained), since it doesn't make sense for a timetable entry to occur in both week 1 and week 1 at the same time.

While we now hide these mistakes in the frontend through https://github.com/nusmodifications/nusmods/pull/3677, we should have the scraper produce a warning for when duplicated weeks appear in the weeks attribute of a timetable entry, so we can let the relevant departments know (especially if it's a systematic issue)