Lorena A. Barba group

Jupyter-based courses in Open edX: Authoring and grading with notebooks

two speakers at conference

On May 30th, Prof. Barba presented at the Open edX Conference, together with Miguel Amigot II, CTO of IBL Education, the recent work to integrate Jupyter with the Open edX platform. The talk showcased two new Open edX extensions (XBlocks): one for pulling content into a course from any public Jupyter notebook (from its URL), and the other to integrate auto-graded assignments based on Jupyter notebooks, and the nbgrader Jupyter extension.

Prof. Barba has been teaching with Jupyter for the last five years. Her first open teaching module using Jupyter was "CFD Python" (a.k.a. "The 12 steps to Navier-Stokes"), released in July 2013. In 2014, Barba developed and taught the first massive open online course (MOOC) at the George Washington University: "Practical Numerical Methods with Python." The course was written entirely as Jupyter notebooks, and it was self-hosted on a custom Open edX site (where it amassed more than 8000 users over 3 years). Since that time, she has been thinking about ways to integrate Jupyter with Open edX.

Open edX is the software platform used by the edX Consortium to serve thousands of online courses to millions of users around the world. —Read Prof. Barba's guest post in Class Central: What’s Open edX?

Jupyter is a set of open-source tools for interactive and exploratory computing. At the center of them is the Jupyter Notebook, a document format for writing narratives that interleave multi-media content with executable code, using any of a set of available languages (of which Python is the most popular).

The work presented at the conference is the brainchild of Prof. Lorena Barba, implemented by her tech partners at IBL Education. It consists of two Open edX extensions:

  1. Jupyter Notebook Viewer XBlock—from any public Jupyter notebook (e.g., in a public repo on GitHub), pull content into a course learning sequence using only the URL, and optional start and end marks (any string from the first cell to include, and the first cell to exclude). This allows course authors to develop their course content as Jupyter notebooks, and to build learning sequences reusing that content, without duplication. It also has the added benefit that the development of the material can be hosted on a version-controlled repository. (Open edX, itself, doesn't provide version control of course content.) See IBL's post about the XBlock, and the code repository—the XBlock is open source under a BSD3 license.
  2. Graded Jupyter Notebook XBlock—create an assignment using the nbgrader Jupyter extension, then insert a graded sub-section in Open edX that will deliver this assignment (as a download), auto-grade the student's uploaded solution, and record the student's score in the gradebook. The XBlock instantiates a Docker container with all the required dependencies, runs nbgrader on the student-uploaded notebook, and displays immediate feedback to the student in the form of a score table. See IBL's post, and the code repository—the XBlock is open source under BSD3.

The two XBlocks are in use in Prof. Barba's newest online short course: "Get Data Off the Ground with Python."

Video of the presentation

Presentation slides

On Twitter


This work is funded under NSF Award #1730170: CyberTraining: DSE—The Code Maker: Computational Thinking for Engineers with Interactive, Contextual Learning. Full proposal available online at https://doi.org/10.6084/m9.figshare.5662051.v1