Closed MakotoTheKnight closed 1 year ago
I am not able to reproduce the issue with those steps. /api/v1/sections/<sis_id>/enrollments
returns active and inactive enrollments. The code you highlighted isn't in a code path that this API call would hit; that code handles the sis_user_id
parameter specifically.
@jstanley0 - apologies for the miscommunication! I just double-checked the conversation and it is the case we are using the sis_user_id
parameter. I'll update the original post to reflect that.
@MakotoTheKnight We now default to returning the old behavior of inactive enrollments if the state param is not included in the request. You should see the change reflected in the Beta environment.
Thank you @augiethornton! I'm able to confirm that the behavior is now consistent with what we originally expected.
I'll go ahead and close this out now. Thanks again!
Summary:
When making an API call to pull back enrollments through the Enrollments API, my team and I are observing that enrollments that are inactive are not being returned.
We believe that this is the contract that is being violated when attempting to reach out to Canvas:
Note: This is only occurring in the Beta environment for Canvas, but we observed that this is slated for a future release sometime in early May.
Steps to reproduce:
/api/v1/sections/<sis_id>/enrollments?sis_user_id[]=<sis_id>
, ensuring that the aforementioned account has a few inactive enrollmentsExpected behavior:
All enrollments, including inactive ones, are returned
Actual behavior:
Only active enrollments are returned.
Additional notes:
If the change to the API does mandate that it not bring back inactive records by default, then the filters introduced by this commit are overly restrictive and should be loosened up somehow.