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

Hashed ID Potentially Causes Requisite Cycles #91

Open
haydenfree opened this issue Feb 29, 2020 · 0 comments
Open

Hashed ID Potentially Causes Requisite Cycles #91

haydenfree opened this issue Feb 29, 2020 · 0 comments

Comments

@haydenfree
Copy link
Member

haydenfree commented Feb 29, 2020

Under the following conditions the toolbox will incorrectly think that there is a requisite cycle in the curriculum due to two courses having the same ID:

  • Two courses have the same name
  • When the Course() constructor is called the ID is not passed as a keyword arguement
    • This means the toolbox will generate a course ID via the following
    • mod(hash(this.name * this.prefix * this.num * this.institution), UInt32)
  • The prefix, num, and institution keyword args are also not passed
    • These therefore aren't used when hashing the course ID
  • One of the courses lists the other as a requisite
    • The courses will have the same ID (hashed by toolbox) and be detected as a cycle

Below is an example

Course ID Course Name Prefix Number Prerequisites Corequisites Strict-Corequisites Credit Hours Institution Canonical Name Term
3 First-year Comp. ENGL 101       3     1
9 First-year Comp. ENGL 102 3     3     2

This bug only happens under the perfect set of circumstances, and was very difficult to track down...

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

No branches or pull requests

1 participant