-
Notifications
You must be signed in to change notification settings - Fork 319
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
Misaligned module code in Prerequisite Tree #3841
Comments
FIN2704 is an active mod that links to FIN2704/FIN2704X, so Fix is trivial but UX requires consideration, there are a few options: |
@zehata What if "Course starting with" is replaced with an enumeration of all versions of the module using a "one of" branch? Think that would be more aligned with the design of the rest of the prerequisites trees (but not sure how feasible is this) |
@Jiwei99 Something like this? I agree with you that this solution seems the cleanest, since it is more consistent with mods that don't use wildcard prerequisites. However, I noticed that if the required grade is not D, the UI will look this: (not the prettiest) Update: looks like doing it this way will also fix a previously unfound bug - if required grade is not D, the current UI will not show it because the prefix get overridden: nusmods/website/src/views/modules/ModuleTree.tsx Lines 56 to 67 in 0f33a55
|
The grade requirement is only shown when it is not the default 'D' grade. |
I think it is an edge case in which prerequisites don't use the default 'D' passing grade AND use the "Courses starting with" pattern. So I think that is not of priority and could be fixed with a separate PR. |
Also @ core team, an alternative is to update ANTLR to branch when encountering wildcard modules instead of appending % when scraping, which is a cleaner implementation but will also be more complex computationally on the server. I think practically speaking this frontend implementation is sufficient. |
I think this is fine -- we only run the scraper once every hour. I can see this working by modifying this nusmods/scrapers/nus-v2/src/services/requisite-tree/index.ts Lines 27 to 48 in 0f33a55
If we decide we want to expand wildcards, I'm slightly in favour of going the backend/scraper route, but would love to hear input from the other maintainers @nusmodifications/nusmods-developers. But going back to earlier discussion, do we want to expand these "courses starting with" in the first place? I'm afraid that it might generate huge and unwieldy pre-req trees in some cases. If anyone has some time, could we perhaps get a sense of what's the largest pre-req tree this could potentially generate (in terms of number of rows/lines)? Probably by writing a quick script that runs across all the modules in I like this UI actually. Just have a question on the second (turquoise) branch where it says "one of" but only has one module. Is this just bad test data for the screenshot or is this a possible scenario? |
Describe the bug
Some module code in the Pre-Requisite Tree is misaligned.
To Reproduce
Steps to reproduce the behavior:
Layout of FIN2704 is different from rest of the moduleshttps://nusmods.com/courses/FIN3716/financial-modelling
Module codes are not aligned properly, and the alignment is inconsistent
https://nusmods.com/courses/BSP3701A/strategic-management
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: