srct / schedules

Browse the GMU course catalog, professors, and build your course schedule
https://schedules.gmu.edu
Apache License 2.0
2 stars 0 forks source link

When entering a CRN that does not exist, it is unclear that the course was not found. #29

Closed Nicholas-Thor-Page closed 4 years ago

Nicholas-Thor-Page commented 4 years ago

Entering in an invalid CRN brings the user to an error page instead of notifying the user that the course does not exist. (https://schedules.gmu.edu/search?query=99999)

A quick fix could be to simply serve the user to a "no course found" page (https://schedules.gmu.edu/search?query=ABC%20123) but it could also suggest courses 'close' to the incorrect CRN (https://schedules.gmu.edu/search?query=CS%2099)

A similar problem is that this also happens whenever the query contains a 5-digit number (https://schedules.gmu.edu/search?query=CS%2075005) and while this is less likely than entering the wrong CRN, its a reasonable mistake for a user to make.

In any case, only telling the user "an error has occured" could lead to more attempts to enter the same query, which will result in the same error every time.

For those unfamiliar with the codebase (like me) I suggest starting in app/controllers/search_controller.rb and looking for the code block with CourseSection.latest_by_crn