nusmods
nusmods copied to clipboard
Allow searching and display of modules not offered in the current AY
NUS Bulletin's Search Modules page will be removed in July, and NUSMods is to take over this functionality for the university.

However, NUSMods currently does not show modules which are not offered in the system, an essential feature. We accomplish this by ignoring all modules which do not have timetables. This was done because there was no need to show non-offered mods. However RO has since told us that:
The reason why we may need a comprehensive listing of active modules in NUSMods (including those that haven’t been timetabled) is because students may wish to e.g. map a module they have taken while on SEP back to NUS.
TODO
- [x] Modify scraper to process all mods, even if they're not offered in the AY (#1776)
- [x] Modify website to search through all 11+k modules. This will require an overhaul of the module search page as the current offline search is not scalable for longer - it currently downloads 5+MB of data (for ~5.5k mods) when the module page is loaded, and the new combined offered+non-offered mods list is over 10MB in size. Also, searching through more modules will require more computational power that weaker devices will not be able to support.
New module search bugs introduced in #1791 that have to be fixed before deploying
- [x] Pager is too wide on mobile devices and tablets, especially after navigating a few pages. (#1856)
- [x] Pager is not styled correctly in dark mode. (#1856)

- [ ] API error looks bad as it does not take up the whole screen.

- [ ]
<X> modules foundtext does not display the current page or the current range of displayed mods, which can be confusing. - [ ] No results found for empty search string is bad. Demo: http://localhost:8080/modules?level[0]=8000&mcs[0]=9

- [x] Only show mods offered this AY by default (#1889)
- [ ] Mods should be sorted by module code if there are no selected filters and no search query
- [x] Search loading indicator is distracting and is not visible when scrolled down (#1857)

New module search bugs caused by data changes in #1776
- [x] Fix display of non-offered mods in the module list (together with the Elasticsearch module search overhaul) (#1891)

- [x] Fix non-functional "Add to" button in the module page (#1891)

- [x] Add notice to module page to notify user that the module is not offered in the AY (#1891)
- [ ] Techdebt: default query string introduced in https://github.com/nusmodifications/nusmods/pull/1889 is a terrible solution and should be fixed.