tl-its-umich-edu / canvas

Integration scripts between ITS TL and Instructure Canvas
Other
3 stars 8 forks source link

failed to loop all pages from Canvas course API result #139

Open zqian opened 1 year ago

zqian commented 1 year ago

The current implementation of Canvas_API_call function relies on the ref="last" value returned from the Canvas Pagination link header

However, the last value may be missing if the API call is expensive for all pages:

These will only be included if they are relevant. For example, the first page of results will not contain a rel="prev" link. rel="last" may also be excluded if the total count is too expensive to compute on each request. As a result, the sis_set_url.rb now only works on the first page (100 courses) returned from Canvas course API call, and did not update all course site urls.