harvard-edtech / caccl-api

A class that defines a set of smart Canvas endpoints that actually behave how you'd expect them to.
MIT License
1 stars 2 forks source link

Fix multi-page post-processing for quiz.listSubmissions #24

Closed gabeabrams closed 2 years ago

gabeabrams commented 5 years ago

Now concatenating quiz_submissions into one list to fix multi-page get.

See https://github.com/harvard-edtech/caccl-api/issues/23

jonseitz commented 5 years ago

@gabeabrams I'm having a little trouble reproducing the initial error to make sure that this fix is working correctly. The api.course.quiz.listSubmissions method in master is working when I try it against an quiz with < 50 submissions, so how can I simulate the conditions where it was failing before?

gabeabrams commented 5 years ago

@jonseitz Great question! The easiest way to simulate this is to change the number of items on each page. For instance, setting the number per page to 2 would give you 25 pages for your 50 submission assignment.

You can do this one of two ways: when creating an instance of caccl-api, set defaultItemsPerPage OR you can individually set itemsPerPage when making a call to an api function.