ucsb-cs156-s24 / proj-courses-s24-4pm-3

https://ucsb-cs156-s24.github.io/proj-courses-s24-4pm-3/
0 stars 0 forks source link

BUG: Add course dialog allows adding course to the wrong schedule #6

Closed github-actions[bot] closed 1 month ago

github-actions[bot] commented 2 months ago

Summary

When using the button on the main course search results to add a course to a personal schedule, the button allows the user to add courses to a schedule for a different quarter than the course. This should not be allowed. Instead, the modal that shows a list of personal schedules to choose from should only show personal schedules for the quarter that matches the course being added. If no such personal schedules exist, the model should say, for example (if the quarter is F24):

No personal schedules exist for quarter F24. [Create One]

Where [Create One] is a button that navigates to the create page for personal schedules.

Expected Behavior

When adding a course from a given quarter to a personal schedule, only schedules that match the quarter of the course should be presented as options.

Current / Observed Behavior

When adding a course from a given quarter to a personal schedule, all personal schedules are presented as options. This results in incorrect behavior, where one of two things happens:

Steps to Reproduce

  1. Login to the https://courses.dokku-00.cs.ucsb.edu website

  2. Create at least one personal schedule for a given quarter (e.g. W22 as shown below)

    image
  3. Search for a course from a different quarter (e.g. S24)

    image
  4. Find a course you can add with the Green Add button. Click the button to add that course to a personal schedule.

  5. The modal pops up as shown below. Select a schedule for the wrong quarter.

    image
  6. Observe that you get either an error or you get a course other than the one you intended showing up on your schedule.

Here's what the error looks like:

image

Here's what a wrong course looks like. This happens when by coincidence, there is a course with the same enrollment code in the target quarter (but it could be an entirely different course! In this case, we tried to add ANTH 3 from F24 but ended up with ANTH 5 from W22.)

image image image

Acceptance Criteria