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

[Bug]: Course name for courses like CS 4V95 #183

Closed
3 of 4 tasks
AbhiramTadepalli opened this issue Sep 4, 2024 · 4 comments · Fixed by #190
Closed
3 of 4 tasks

[Bug]: Course name for courses like CS 4V95 #183

AbhiramTadepalli opened this issue Sep 4, 2024 · 4 comments · Fixed by #190
Assignees
Labels
Good First Issue Good for newcomers Type: Bug Report Issues pertaining to non-security-related issues Type: User Experience Front facing feature

Comments

@AbhiramTadepalli
Copy link
Contributor

AbhiramTadepalli commented Sep 4, 2024

What happened?

CS 4V95 is a "special topics" course: "Undergraduate Topics in Computer Science Software Engineering". Right now, it shows "Undergraduate Topics in Computer Science - Network Traffic Generation" as the course's name; this is one instance of the class, but doesn't represent the entire class.

What should happen

Any course that has a variable (special topic) should have a general course name, not the specific instance of the course that comes after the dash in this case

  • Identify all the "special topics" courses like (variable number of credit hours, like CS 2V95)
  • Find a way to remove the specific info from the course name
  • Verify it works for all courses like this

Version

Beta 0.1.0

What browsers are you seeing the problem on?

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@AbhiramTadepalli AbhiramTadepalli added Type: Bug Report Issues pertaining to non-security-related issues Good First Issue Good for newcomers Type: User Experience Front facing feature labels Sep 4, 2024
@AbhiramTadepalli
Copy link
Contributor Author

somewhat related to: #173

@egsch
Copy link
Contributor

egsch commented Sep 13, 2024

Courses with variable credit hours that are showing course section titles instead of general class titles:

VS 4V98 - Undergraduate Research in Computer Science - Undergraduate Research in Cs
EE 4V98 - Undergraduate Research in Electrical Engineering - Cochlear Implant Research
CE 4V95 - Undergraduate Topics in Computer Engineering - Fundamentals of Power Systems
CS 4V95 - Undergraduate Topics in Computer Science - Network Traffic Generation
ED 4V95 - Special Topics in Education - Exceptional Populations
EE 4V95 - Undergraduate Topics in Computer Engineering - Fundamentals of Power Systems
BA 4V00 - Special Topics - 4350 Global Mkt Entry Strategy
FIN 4V90 - Individual Study in Finance - Profitability Tech Aviat Mkt
NSC 4V90 - Special Topics in Neuroscience - Tauopathies
IMS 3V92 - Regional Management Area Studies Western Europe - Rome, Italy
IMS 3V94 - Regional Management Area Studies Africa - Rwanda
IMS 3V93 - Regional Management Area Studies Asia - Tokyo, Japan
BIOL 3V00 - Topics in Biological Sciences - Biomedical Systems & Modeling
HONS 3V00 - Special Topics - CV Honors:primer Endocrinology
Mech 3V95 - Topics in Mechanical Engineering - Materials Sci Sustainable Engy
LANG 2V42 - Topics in Language - Spanish Language Internship
UNIV 2V96 - Special Topics I - First Gen Student Success
BIOL 1V00 - Topics in Biological Sciences - Contemp Clinical Explorations

May be missing some with non-variable hours. These are all separated by " - ", but we also have some other courses with " - " in the course title like BPS 4395 - Capstone Senior Project - Business so simply splitting by " - " might not work.

@egsch
Copy link
Contributor

egsch commented Sep 14, 2024

Update after looking into this more, sorry this is a lot for a small bug:

  • Most calls to the course API for special topics courses return at least one course with a general title/# of credit hours. However, these usually aren't from the most recent catalog year, so when we sort the response array we get one with a specific section title and (sometimes) a specific # of credit hours.
    • When we're parsing the description for a course in the second category, having a specific credit hour # instead of a range can break the description similar to the special character issue.

Obvious possible solutions:

  • Filter for the older general course catalog listings and hope nothing's changed. May not fix credit hour issue.
  • Parse the course titles and remove the part after the ' - ' only if hours are variable. Still leaves credit hour issue.
  • Tell the API team about the issue and get them to standardize future course names/credit hour listings. Might be a good idea, but won't solve the issue for the release.
  • Replace our current parsing algorithm with something like this and return title/credit hours to use in component (this would also fix [Bug]: Course Description includes the course's name when it contains special characters. #173 but might cause other issues):
const [descriptionBeforeCreditHours, descriptionAfterCreditHours] = course.description.split(/\([\d\-]{0,3} semester credit hours\)/);
let formattedDescription = descriptionAfterCreditHours || course.description;
const courseTitle = descriptionBeforeCreditHours.split(course.course_number + " - ")[1] || course.title;
const creditHours = course.course_number[1] =='V' ? course.description.split(" semester credit hours\)")[0].split("(")[1] : course.credit_hours;

Honestly I'm not sure between these, none of them seem ideal.

@AbhiramTadepalli
Copy link
Contributor Author

Actually I think the last one (parsing the description for the title) should work best. We can default to the title API gives us if we are unable to identify the title from the descriptions.

Go ahead and implement this and we can test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good for newcomers Type: Bug Report Issues pertaining to non-security-related issues Type: User Experience Front facing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants