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

In schedule generator, only allow courses matching requirement to be added #948

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

Destaq
Copy link
Member

@Destaq Destaq commented Oct 20, 2024

Summary

Currently, in the schedule generator, if you select e.g. the "Mathematics" requirement you can still click add any school course to the "requirement block", even if it would not fulfill the Mathematics requirement. With the introduction of this PR, that issue is resolved — you can now only add courses to a requirement that actually fulfill that requirement.

Test Plan

Go to the builder page and pick a requirement.

image

Verify that only courses which would fulfill that requirement show up in the modal.

image

Note that this behavior does not apply for the "No Requirement" requirement block, as would be expected.

Notes

We still have the UI oddity where you can select which requirement to match a course to if there are multiple options.

image

Or it could say 'not automatically fulfilling any requirement'. I think we should just get rid of this stuff in the modal as it is not relevant to schedule generator (though very relevant to the base dashboard).

Also, please note that the FWS example in the test plan will not show you any FWSes if you type in 'FWS'. This is because the migration script for this semester hasn't seemed to have actually found / counted FWS courses. If you look at the Fall 24 brochure, you'll notice that the FA24 specific courses (ones that don't happen in other semesters) do not show up in any new course modals. This is not an issue with this PR but rather with our typed course JSON consistency.

@Destaq Destaq requested a review from a team as a code owner October 20, 2024 03:55
@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 24.

Copy link
Contributor

github-actions bot commented Oct 20, 2024

Visit the preview URL for this PR (updated for commit c0a38c2):

https://cornelldti-courseplan-dev--pr948-simon-filtered-sche-4jod672w.web.app

(expires Thu, 28 Nov 2024 20:39:47 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 6d4e0437c4559ed895272bbd63991394f1e0e933

@@ -26,19 +26,19 @@
</button>
</div>
<div v-if="showDropdown">
<p class="requirement-header-subtext">Please select a major requirement.</p>
<p class="requirement-header-subtext">Please select a major/minor requirement.</p>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also added this as the possible requirement groups include those that apply to your minor.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR, Simon! I agree that we should probably remove that second UI step regarding courses that to not automatically fulfill requirements...for now, the filtering works great. Tested with a few requirements/courses. Thanks for the fix!

@Destaq Destaq merged commit 61c2955 into main Oct 29, 2024
10 of 11 checks passed
@Destaq Destaq deleted the simon--filtered-schedgen branch October 29, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants