nusmodifications / nusmods

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

Exclude Hidden Modules from being exported into iCal #3681

Closed maverick-g00se closed 3 months ago

maverick-g00se commented 3 months ago

Describe the bug

Hello! Modules that are hidden on the timetable appear in the iCal when exported.

To Reproduce

Steps to reproduce the behavior:

  1. Add a couple of sample modules
  2. Hide at least one module
  3. download/export as iCal
  4. Open the file with TextEdit and you can see an error where hidden modules are exported into the iCal

Expected behavior

Technically what the users export is usually based on what they can see on the timetable, hence, modules that are not visible on the timetable at the time of export should not appear in the exported iCal.

If this does get accepted as a bug, I have already looked through the code and I would like to give it a whirl :)

Screenshots

Module hidden:

Screenshot 2024-03-23 at 12 12 02 PM

Exported iCal info:

Screenshot 2024-03-23 at 12 12 42 PM
kokrui commented 3 months ago

I think it's reasonable behaviour for hidden courses to be excluded from ics exports. Go for it! @maverick-g00se

maverick-g00se commented 3 months ago

Hi @kokrui, I've submitted PR #3682 to address the current issue. Whenever you have some free time, could you please help to review it? I would greatly appreciate any feedback you could provide. Thank you!

kokrui commented 3 months ago

Yep @maverick-g00se , I'll do it by the end of this week's office hours on Wednesday :)

kokrui commented 3 months ago

Merged! Thanks for the fix!