-bracken
It would be better if Canvas didn't make us pass through those hoops.
After all we're the ones that share our SIS info with Canvas. If
we're willing to share with them its only polite to quickly find a way
to share that info back. :)
Luke
http://itintheuniversity.blogspot.com
There are a few things to consider here:
* Are you sure you want the sis_user_id and not the sis_login_id? I think that normally they are the same, but they don't have to be. sis_user_id is probably the correct choice, I just want to make sure it's considered.
* SIS user ids are considered FERPA-protected by some institutions, so Canvas is careful about where they are exposed. In this case it seems safe, since a teacher (or admin) has to set up the external tool launch and they already have access to SIS identifiers, but we just need to confirm that that is generally okay.
* A user can have multiple pseudonyms, and user.pseudonym will just pull the default one. For an open-source installation this is probably fine, but in Canvas Cloud a user can have many pseudonyms across different schools (which is why it's the pseudonym, and not the user, that stores the SIS identifiers). We want to make sure there that we get the correct pseudonym for the current request. The User model has a helper for this: sis_pseudonym_for:
hash['lis_person_source_id'] = user.sis_pseudonym_for(context).try(:sis_user_id)
(The try is in case sis_pseudonym_for returns nil.)
That said, I've just been told that Bracken has already started implementing this, so maybe all you have to do is wait. :)
--
Zach Wily
VP of Engineering, Instructure
--