LTI/Canvas Integration
See original GitHub issueI think I remember reading that this might be a plan at some point but I can’t immediately find the link again. It is something I need to do for my current project, and I plan to contribute some code for it anyway, just wondered whether any work had been done already or whether there were other plans.
From what I can see, we would need to:
- Read the
lis_outcome_service_url
andlis_result_sourcedid
from the initial LTI authentication - Get the grade as a float 0.0 - 1.0 and place in an XML document
- Sign the request with OAUth 1.0
POST
the XML back to the lis_result_sourcedid value
The Coursera document seems to describe it quite well https://building.coursera.org/app-platform/lti/
I have already made a bare bones version of a custom LTI authenticator which uses OAuthLib
, so I guess I would need to link that so that it saves in the NBGrader database. A final point is that Canvas have extensions to LTI, so that would be a natural subclass of a simple LTI one. I imagine calling it with nbgrader post
, but have no particular ties to that.
In my deployment, we’re not planning to manually grade any assignments, so I’m planning to run a cron job every minute to search for new submissions, and then collect/autograde/feedback and post them. If I ever get it working I’ll put the code up on GitHub 😃
I’m guessing this might be related to #436 ?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:23 (10 by maintainers)
Top GitHub Comments
I ended up going to the first option, and yes, it is (a lot!) more expensive. We don’t have enough users to make it worthwhile adopting the second solution in the end. There are spawners which manage autoscaling for you, such as https://github.com/jupyterhub/kubespawner. I found Kubernetes too complicated to figure out properly, so my plan was to make use of a swarm and write my own simple autoscaler but I never quite had time.
For the Jupyterhub identities, I added a database table which mapped canvas ID to Jupyterhub ID. Because the Canvas IDs are too long for unix names, I called them user-1, … user-n
get_user
andadd_user
deal with this (called after authentication has been confirmed) https://github.com/huwf/ltiauthenticator/blob/master/ltiauthenticator/lti_db.py#L141@huwf - at one point, we had 150 simultaneous users… and given our
standard notebook
Docker Image uses about 0.5GB Memory, real tin with 16GB Ram doesn’t last long!Our hope [in the first instance] is to be able to support somewhere in the region of 300 simultaneous users (which is just 1% of the Universities undergraduate population) - our current problem is out cloud stack complains with more than 4 [notebook] worker nodes