nusmodifications/nusmods

Exclude Hidden Modules from being exported into iCal

Closed this issue · 4 comments

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

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

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!

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

Merged! Thanks for the fix!