Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fix requirements double counting #638
Fix requirements double counting #638
Changes from 12 commits
e1b9d4d
e1811cc
e947ee8
6223f13
c46f054
b2870d4
b27c3bc
184d9e7
d216f37
e4dcd96
3d8f1b2
6c1b543
cdceb4b
20e29db
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the following issue:
College: ENG
Major: CS
Minor: Human Development
Add HD 1150 as a course through the add course modal / semester. Due to the limitation of the add modal, the user cannot choose more than one non-double countable requirement. However, after adding the course, the dangerous graph should have all non-self-check edges not in the constraint violation.
eg. If you choose Liberal Studies, both minor requirements should be connected in the dangerous graph. If you choose a minor requirement, liberal studies should be connected in both the dangerous and safe graph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this and confirmed what you are saying is true!
This isn't ideal on the front-end, as it means that when users choose one of the minor options in the constraint instead of liberal studies, they are still getting liberal studies set to the course. However the new modal will make this flow more clear right? Is there anything we can do in the meantime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue when adding
CS 1110
where adding it to Computing also adds it to Introductory ProgrammingThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is similar to what would happen in the new add flow. There are no conflicts, so we might as well add it. I believe if you choose a non-liberal studies and non-minor requirement, liberal studies would be no longer connected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified the function so that it opted out of all
requirementsThatDoNotAllowDoubleCounting
. So, there should be no constraint violations resulting from the minor requirements.It still automatically selects the liberal studies requirement if it doesn't cause a constraint violation, which is a slight disconnect from the UI. I don't think this can be fixed until the new add modal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this refer to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usage of
.allowCourseDoubleCounting
in the following lines.We should change this to allow adding regardless of whether or not the requirement allows double counting, and resolve the constraint violations later (basically remove the early return). This fix should wait until after most of the frontend is implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make an item for this haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we not need the second check here anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function is only called once in
NewCourseModal.vue
, to generate the automatically fulfilled requirements and the non-automatically fulfilled requirements dropdown. In the past, the if-expression was used to filter out the requirements that allowed double counting which we assumed would always be automatically fulfilled. However, with our reframing of the double counting flag (and in this new implementation), it is filtered later in a similar way.