Customizing the Jupyter XBlock (via tutor-jupyter) to Load Unit-Specific Notebook Files

Hello Open edX Community,

I am operating an Open edX instance using Tutor and have successfully integrated JupyterHub via the tutor-jupyter plugin.

My Goal

I need to enable course instructors to select a unique, specific notebook file that students must open when they access the Jupyter XBlock within a particular course unit.

  • Example: In Unit 1, the Jupyter XBlock should load /course-repo/unit1/assignment.ipynb. In Unit 2, the same XBlock should load /course-repo/unit2/lab.ipynb.

  • The requirement is for an editable workspace (backed by JupyterHub/JupyterLab), not just a static viewer.

The Core Problem / Question

Currently, the standard Jupyter XBlock seems configured to launch a generic workspace based on a repository, or perhaps a default file. I need the ability for the course author to input a specific path/filename into the XBlock settings that is then passed to JupyterHub.

  1. Is it possible to configure the existing Jupyter XBlock (used by tutor-jupyter) to pass a specific, unit-defined notebook file path/name via the LTI launch or other parameters? If so, what is the recommended method to inject this custom parameter (e.g., modifying the XBlock’s Python code, or customizing the LTI configuration within Tutor)?

  2. If the existing XBlock is not easily customizable for this pathing requirement, would the recommended approach be to create a custom XBlock? This custom block would primarily serve to collect the desired file path from the author and ensure it is included in the LTI payload sent to JupyterHub.

I am looking for the most robust and maintainable method to achieve this unit-specific, editable notebook assignment functionality.

Thank you in advance for any guidance or examples!