20. Search Course by CRN (Points: 5)

Implement a feature on the BuildTimetable page that allows users to search for a course using the course’s CRN (Course Reference Number). The user should be able to input a CRN, and upon validation, added to the “worksheet” section of the BuildTimetable page.

The feature should include validation to ensure the CRN is valid and exists in the course database.

To query the backend, you can either add new CRN query parameter to the /scheduledEvents endpoint or create a new endpoint.

Both of these would involve modifications to the scheduleEventsRouter.


Acceptance Criteria:

  1. Users can input a CRN to add a course to their schedule.
  2. The system validates the CRN and provides appropriate feedback for valid or invalid inputs.
  3. If the CRN is valid, the course is successfully added to the user’s timetable.
  4. The feature handles potential scheduling conflicts and notifies the user accordingly.