-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow SIS IDs #440
Comments
From using pandarus I have never found a endpoint that did not accept an sis_*_id when that was a relevant. Honestly I did not realize that doing this was not supported yet in canvasapi. |
Admittedly, we thought we had all the cases covered too! It turns out there's a need for a general-purpose solution, like in |
I am in the process of porting over my course creation and enrollment management tool from ruby to python for institutional reasons. Since I generally am dealing with our external ids (that become SIS id) for courses and humans instead of the canvas ones I have found the sis_*_id: syntax to be really handy. |
…enroll_user to support 'sis_login_id:' syntax
it's a PR now: #522 |
I just ran into this today while creating pairing codes for students. We had a list of SIS IDs and I think I prefer the One thing that would help in the short term is linking to valid |
It is common for users to want to use SIS IDs in lieu of canvas IDs. Canvas provides a way to use these alternate IDs with the syntax
<ID_TYPE>:<ID_VALUE>
, e.g.sis_course_id:A1234
.In some cases, like Canvas.get_user() and Canvas.get_account(), we added special (optional) arguments like
id_type
anduse_sis_id
, respectively. These allow users to indicate that the ID being passed is something other than a Canvas ID.It turns out that there are many more places this functionality would be useful. In particular, we received a request to add it to Course.enroll_user() for the
user
parameter. This is different from our previous implementations because those only modified the URL, not individual parameters.Instead of adding optional arguments like
id_type
,use_sis_id
, it's probably most straightforward to allow users to pass any properly-formatted string as an ID (e.g."sis_course_id:A1234"
). This is currently not possible with any ID that goes through theobj_or_id
to check. We'll need to modifyobj_or_id
to allow SIS IDs. There are also "special IDs" that Canvas lists. We actually have some exceptions forself
, but there are others.This raises the question of what kind of checks to put into place regarding "valid" SIS IDs. Should we only allow specific ID types (from a list of all the Canvas-accepted ones), or allow any string that the user passes? Should we limit the types to only relevant ones (e.g. not allowing
sis_course_id
when the ID should be a user)?Curious for others thoughts on the matter.
Some action items:
enrollment[user_id]
parametercanvasapi.util.obj_or_id
to accept SIS IDs (and possibly other special IDs)id_type
inCanvas.get_user()
)The text was updated successfully, but these errors were encountered: