Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow filtering for "evening courses" #3668

Open
kokrui opened this issue Mar 13, 2024 · 5 comments
Open

Allow filtering for "evening courses" #3668

kokrui opened this issue Mar 13, 2024 · 5 comments

Comments

@kokrui
Copy link
Member

kokrui commented Mar 13, 2024

This has historically been a very common request. We should allow users to filter courses by whether they are "evening" course.

I'm not sure if there is a universally-agreed definition of "evening course", but I think a reasonable implementation could be that for all types of slots (lecture/tutorial/lab/etc.), there must exist at least 1 slot that is beyond 6pm

Feel free to suggest alternative interpretations though!

@jushg
Copy link

jushg commented Mar 13, 2024

Hi @kokrui. Judging from the context, most student would want the filtering for choosing modules to take on Industrial Attachments or ATAP. NUS allows a student to enroll in a module if it doesn't interfere with working hours, meaning if one's work ends at 5pm, they can enroll in a module that has a lecture that begins at 530pm.

Hence, I think that it would be better for the filtering to allow user to choose the time they want to consider as evening (e.g. beyond 7pm/ beyond 5pm), instead of fix at 6pm.

@woojiahao
Copy link
Contributor

This could be a generic filter that allows people to filter by time for modules that satisfy the condition that @kokrui mentioned. So it can apply for 5pm onwards, 5.30pm onwards, etc.

@chew01
Copy link
Contributor

chew01 commented Mar 13, 2024

I think a good implementation of that generic filter would have a time slider. Either way, an implementation of this would require sending more data to Elastic servers. We will need to include SemesterData.timetable, or at least pre-process for the latest possible classes, in the payload to index modules courses by latest classes, so that the data can be exposed to the filter.

Also that we probably will have to filter courses that have both lectures and tutorials after given time...?

On a side note, I'm thinking if having a mock payload for elastic search result is worth the overhead, considering any frontend development right now related to new features relies on live data...

@kokrui
Copy link
Member Author

kokrui commented Mar 15, 2024

A time slider/picker sounds good and I'd be happy to accept PRs that implement that -- I think we can extend this to 2 time sliders for "BEFORE" and "AFTER", for people who want to end lessons early / start lessons late / a combination of both.

I can't think of a good concise wording to capture the "forall slot types, there exists 1 slot that's before/after X" right now though, hm

@kokrui
Copy link
Member Author

kokrui commented Mar 20, 2024

This is a good reference PR for adding filterable fields! #3666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants