nulib / avalon

Variations-on-Video Hydra app
Apache License 2.0
3 stars 0 forks source link

Long Canvas course IDs getting truncated #451

Closed mbklein closed 4 years ago

mbklein commented 4 years ago

When Course Reserves attempts to add a course with a long course ID (e.g., 2019FA_SPANISH_397-0_SEC2_AND_PORT_396-0_SEC20_AND_COMP_LIT_305-0_SEC21) to a media object, the ID gets truncated to 50 characters. As a result, the item does not display for logged in members of that course. This isn't a backend storage issue, because adding the course from the Rails console works just fine. The issue is somewhere in the UI and its support code.

mbklein commented 4 years ago

The autocomplete call:

$ curl "https://media.northwestern.edu/autocomplete?q=2019FA_SPANISH_397-0_SEC2_AND_PORT_396-0_SEC20_AND_COMP_LIT_305-0_SEC21&t=externalGroup"
[{"id":"2019FA_SPANISH_397-0_SEC2_AND_PORT_396-0_SEC20_AND","display":"2019FA_SPANISH_397-0_SEC2_AND_PORT_396-0_SEC20_AND_COMP_LIT_305-0_SEC21"}]
mbklein commented 4 years ago

Upon further investigation, it seems this is not an Avalon problem. Ares is only sending the first 50 characters of the course ID during the LTI call that initializes the course. Manually changing it to the full ID in AVR's courses table makes the issue go away.

mbklein commented 4 years ago

Kurt has worked with the Atlas folks to pinpoint exactly where the Ares LTI configuration is pulling from, and it's a field that's limited to 50 characters. Once it's updated to use the full ExternalCourseID, this issue should be resolved.