@rmotr/jupyterlab-solutions

Add your own exercises to JupyterLab

Usage no npm install needed!

<script type="module">
  import rmotrJupyterlabSolutions from 'https://cdn.skypack.dev/@rmotr/jupyterlab-solutions';
</script>

README

JupyterLab Solutions

A simple extension to hide solution cells in Jupyter Lab. Meant for teachers and students.

Demo as teacher

solutions-teacher

Demo as student

solutions-student

Installation

To install using pip:

jupyter labextension install @rmotr/jupyterlab-solutions
pip install jupyterlab-solutions
jupyter serverextension enable jupyterlab_rmotr_solutions

Development

For a development install (requires npm version 4 or later), do the following in the repository directory:

npm install
jupyter labextension link .

also add

{
  "NotebookApp": {
    "nbserver_extensions": {
      "jupyter_nbextensions_configurator": true,
      "jupyterlab_rmotr_solutions": true
    }
  }
}

on /Users/<USERNAME>/.jupyter/jupyter_notebook_config.json.

Adding custom variables

Add the following to /Users/<USERNAME>/.jupyter/jupyter_notebook_config.py.

c.JupyterLabRmotrSolutions.is_enabled = True # True, False
c.JupyterLabRmotrSolutions.role = 'teacher' # 'teacher', 'student'