seas-computing / course-planner

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

Multi-Year/Course Admin: Courses should be sorted numerically #616

Closed jonseitz closed 1 year ago

jonseitz commented 1 year ago

Currently, the Multi-Year Plan and the Course Admin pages sort courses alphabetically by catalog number, which means that a course like CS 50 is appearing after all the 100, 200, and 300 level courses. We should instead be sorting numerically, as we do on the Courses Table.

There are numberInteger and numberAlphabetical fields on the Course entity that we can use to accomplish this. That should be relatively straightforward to add to the Course admin, but the multi-year plan is using a View that does not include those fields, so I suggest we either:

Then replace

  .addOrderBy('catalogNumber')

with

  .addOrderBy('numberInteger')
  .addOrderBy('numberAlphabetical')

in CourseInstanceService#getMultiYearPlan.