hypothesis / lms

LTI app for integrating with learning management systems
BSD 2-Clause "Simplified" License
46 stars 14 forks source link

Handle invalid dashboard IDs in the query string (FE) #6537

Open acelaya opened 3 months ago

acelaya commented 3 months ago

Up until now we have not validated the selected courses, assignments and students that are represented in the URL query.

This means we will be showing "4 students" if the student_id query param appears 4 times, but if those are invalid values, the listbox might show a different amount of selected items.

This is even trickier to achieve with pagination in mind, as it is possible there are valid IDs in the query which are not part of the already loaded pages.

robertknight commented 3 months ago

In https://github.com/hypothesis/lms/pull/6540#issuecomment-2285750118 I identified an easy way to end up with "invalid" IDs in the query string just by clicking around our existing interface.

In the "All courses view":

  1. Select two assignments from different courses
  2. Navigate into one of the courses

Following the change in https://github.com/hypothesis/lms/pull/6540, the two assignments remain in the selection, but only one of them exists in the new view.