seas-computing / course-planner

SEAS Course Planning Application. JSDoc Docs at: https://seas-computing.github.io/course-planner/
0 stars 1 forks source link

Faculty/Plan/Schedule: Apply "sameAs" logic to other interfaces #642

Closed jonseitz closed 1 year ago

jonseitz commented 1 year ago

When a course is marked as a child of another course via the "sameAs" field, we show the course instances from the parent course in place of the child's own instances on the Courses page. This is correct, but that means that faculty and meeting assignments are only being made to the parent course, not to any of the children. This, in turn, means that other pages will only show this information for the parent courses as well:

In all three of those cases (and potentially in others) we want to make sure that we're showing all of the equivalent courses, not just the parents.

In the CourseInstanceService, we resolved this by adding COALESCE(c."sameAsId", c.id) to the join clause for the course instances. We would need something roughly similar for the other cases noted above.

Interestingly, this problem is being masked by the way we imported the course data from the old courses planner. We included the instance information for every course BEFORE applying the sameAs relationship, so the existing child instances are still present in the system and are being queried by the current logic. But as the Academic Programs team has been changing parent courses in the system they've noted that their changes are not being carried over to the children.

There is a related/inverted problem that's specific to those imported courses as well: If a faculty member is removed from the instructor list on a parent courses, the child course won't be updated and will still appear in the Faculty List, Four-Year Plan, etc. Adding the logic above should resolve this issue as well, but we should make sure to check. The specific cases cited by Patrick and Sarah are:

  1. Eli Tziperman - was teaching EPS 101 and ESE 101 in Spring 2025; after he was removed from ESE 101 ("parent") the EPS 101 ("child") course is still appearing on the faculty page.
  2. Gage Hills was teaching CS 148 ("parent") and CS 248 ("child") in Spring 2025; after removal from CS 148 the CS 248 is still there.
  3. The 4-year plan shows ES 121 ("parent") was being offered in the Spring 2025, while AM 121 ("child") is being offered in the Fall 2024. They should both be offered in the spring only.
jonseitz commented 1 year ago

This should still be open pending #662