Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Canvas & JupyterHub Integration

272 views

Published on

Automating course administration with Canvas, JupyterHub, and nbgrader. How can we teach data science to students and impart transferable skills while allowing them to focus on the code with little emphasis on a complicated setup process? Similarly, how can we ease the burden on instructors during the term so they can focus on teaching?

Published in: Education
  • Be the first to comment

Canvas & JupyterHub Integration

  1. 1. JupyterHub & Canvas Integration DSCI 100 @samhinshaw
  2. 2. Goals for DSCI 100 • Code in the cloud—no device restrictions or complex installation prerequisites. • Canvas as single location for students to navigate to. • No need to interface directly with git or GitHub. • Transferable knowledge—no “special” sandboxed environments that do not translate to real-world use. Students - Focus on the code!
  3. 3. Goals for DSCI 100 • Ease of configuration • Automated course setup • True automated grading Instructors - Reduce administrative burden!
  4. 4. • A server framework to host Jupyter notebooks and authenticate users • A learning management system to manage assignments. • Serves as single location for students to visit. nbgrader • An automated grading system.
  5. 5. Jupyterhub Overview ZFS Fileserver GitHub Grading Server Canvas
  6. 6. Jupyterhub ZFS Fileserver GitHub Grading Server Overview Canvas Api Endpoints Assignments Submissions Users Course ... ... ... ... Front End
  7. 7. Jupyterhub ZFS Fileserver GitHub Students release/ Public Grading Server Overview Instructors config.py gradebook.db Private source/ release/ Canvas Api Endpoints Assignments Submissions Users Course ... ... ... ... Front End
  8. 8. Jupyterhub GitHub ZFS Fileserver /tank/home Student 1 release/ Student … release/ Student N release/ Grading Server Overview GitHub Students release/ Public Instructors config.py gradebook.db Private source/ release/ Canvas Api Endpoints Assignments Submissions Users Course ... ... ... ... Front End
  9. 9. Jupyterhub Canvas ZFS Fileserver Api Endpoints Assignments Submissions Users Course ... ... ... ... /tank/home Student 1 release/ Student … release/ Student N release/ /tank/home Grading Server /tank/home Instructors gradebook.db ... Private Overview GitHub Students release/ Public Instructors config.py gradebook.db Private source/ release/ Front End
  10. 10. What Ties Everything Together? • rudaux is a Python module which provides the framework for managing a course with Canvas and JupyterHub • ltiauthenticator is a JupyterHub authenticator that receives Canvas launch requests and grabs Canvas ID • nbgitpuller is a Jupyter plugin that allows unidirectional git sync and redirection • The Canvas API enables bidirectional data transfer between JupyterHub and Canvas rudaux github.com/samhinshaw/rudaux
  11. 11. Clicking this… • Authenticates student by Canvas ID • Pulls homework_1.ipynb to JupyterHub • Opens sandboxed Jupyter notebook (homework_1.ipynb) in new window (ltiauthenticator) (nbgitpuller) (nbgitpuller & dockerspawner)
  12. 12. Jupyterhub ZFS Fileserver /tank/home Student 1 release/ Student … release/ Student N release/ /tank/home User authentication GitHub Students release/ Public (ltiauthenticator) (nbgitpuller & dockerspawner) Instructors config.py gradebook.db Private source/ release/ Canvas Api Endpoints Assignments Submissions Users Course ... ... ... ... Front End
  13. 13. Jupyterhub ZFS Fileserver /tank/home Student 1 release/ Student … release/ Student N release/ /tank/home GitHub Students release/ Public Grading Server /tank/home autograding Instructors gradebook.db ... Private ZFS filesystem snapshots at close time cron job initiates nbgrader grading at close time Instructors config.py gradebook.db Private source/ release/ Canvas Api Endpoints Assignments Submissions Users Course ... ... ... ... Front End
  14. 14. Features • Students’ progress is saved • Students’ notebooks are sandboxed with Docker • Students can only access their own work • JupyterHub access is restricted to LTI launch requests • Student work is automatically gathered for submission at the assignment close date
  15. 15. Student Goals • Students only ever need to visit Canvas. • JupyterHub provides a sandboxed environment with all dependencies preinstalled. • Learning data science with Jupyter provides skills which can be directly applied to future endeavors.
  16. 16. Instructor Goals • Instructors can configure entire course from one file. • Canvas assignments are automatically created for the instructor that point to corresponding assignment URLs. • Grading can be 100% automated, or incorporate feedback from TAs.
  17. 17. Thanks to Tiffany Timbers Ian Allison Mike Gelbart The Ha Calvin Leung Yuvi Panda @samhinshaw
  18. 18. rudaux_config.py Note: this can be incorporated into nbgrader_config.py if you wish to have only one config file c.Canvas.course_id = 5394 c.Canvas.canvas_url = 'https: //ubc.test.instructure.com' c.GitHub.ins_repo_url = 'git@github.ubc.ca:hinshaws/DSCI_100_instructors.git' c.GitHub.stu_repo_url = 'git@github.com:samhinshaw/dsci-100.git' c.JupyterHub.hub_url = 'https: //hub-prod-dsci.stat.ubc.ca' c.Course.timezone = 'US/Pacific'
  19. 19. c.Course.assignments = [ { "name": "week_1", "duedate": "2018-08-14", "duetime": "23:59:59", "points": 2, "manual": True }, { "name": "homework_1", "duedate": "2018-08-15", "duetime": "11:00:00", "points": 5 } ] rudaux_config.py Note: this can be incorporated into nbgrader_config.py if you wish to have only one config file

×