nusmods icon indicating copy to clipboard operation
nusmods copied to clipboard

Improve module search page's exam clash detection

Open kokrui opened this issue 1 year ago • 0 comments

In https://github.com/nusmodifications/nusmods/pull/3560, we improved our exam clash detection algorithm. Previously, we only checked for exam start times, but it's possible that an exam's end time overlaps with another exam's start time.

However, the "No Exam Clash (Sem X)" filters in our Module Search page still use the previous detection method. We should change it to the better exam clash detection algorithm.

https://github.com/nusmodifications/nusmods/blob/d99218bad72e5bed4245669a95d42aa27e1cf14b/website/src/views/modules/ModuleFinderSidebar.tsx#L53

This will require some elasticsearch-fu. Relevant docs: https://www.elastic.co/guide/en/elasticsearch/reference/8.12/query-dsl-range-query.html

kokrui avatar Mar 10 '24 14:03 kokrui