/moodle-mod_jupyter

The Moodle plugin seamlessly integrates Jupyter Notebooks, providing users with a virtual programming environment that enhances their learning experience. With this powerful integration, students and instructors can engage in interactive coding activities and explore diverse programming languages within the Moodle platform.

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

Jupyter Moodle plugin

This Moodle plugin integrates Jupyter Notebooks to offer a virtual programming environment.

The plugin connects to a JupyterHub server and authenticates the Moodle users on the JupyterHub Server. That way they can access a Jupyter notebook from within Moodle.

Automated grading of Jupyter Notebooks is provided through Otter-Grader.
A quick introduction for writing assignments in the Otter-Grader format and a demo Notebook can be fond here:
AutograderNotebook.md
demo.ipynb

Installation

Install this plugin by navigating to Site administration > Plugins > Install Plugins, then drag the plugin moodle-mod_jupyter.zip in the Install plugin from ZIP file zone. Press the Install plugin from the ZIP file button. Screenshot showing how to install the plugin. Drag the .zip of the plugin in the install plugin zone in the admin settings under install plugin.

Plugin Settings

On installation of the plugin, you are prompted to enter the following settings.

JupyterHub URL

  • This is the base url (default: http://localhost:8000/jhub) of the JupyterHub. This url will be used to embed the Jupyter Notebook via iFrame.
  • To access jupyterhub over HTTPS, you need to adjust the url to (https://<IPv4 address or its DNS which the SSL certificate is issued for!>:443/jhub). To serve Jupyter Hub over HTTPS its configuration is required. For proper HTTPS configuration check out Serving Over HTTPS section of the Jupyter Hub back-end.

JupyterHub API URL

  • This is the base url (default for docker: http://jupyterhub:8000/jhub) of the JupyterHub REST API. This url will be used to connect and use the jupyterhub api.

Gradeservice API URL

  • This is the base url (default for docker: http://gradeservice:5000) of the Gradeservice REST API. This url will be used to connect and use the gradeservice api.

Jupyterhub JWT Secret

  • This is necessary for authentification and communication with JupyterHub. It must match with the one set in JupyterHub. Please do not use the default one.

Jupyterhub API Token

  • This is necessary for authentification and communication with JupyterHub. It must match with the one set in JupyterHub. Please do not use the default one.

Create Activity

This plugin is an activity plugin and can be created like any activity plugin.

  1. Activate Edit mode.
  2. Click on Add an Activity or Resource. Now the activity creation from appears. Screenshot showing the "edit mode" toggle on the top right and the "add an activity or resource" in the center.
  3. Enter a name for the notebook activity you want to create.
  4. Drag the .ipynb file for this activity into this field. You can only have one .ipynb file per activity. If you have more files, create multiple activities.
  5. Select if you want to use the automatic gradeservice by Otter-Grader. Screenshot showing the activity creation form. The three described options are displayed.

Use Activity

When the activity is created, you can navigate to it by clicking on it directly or via the hierarchy. The activity view page opens that includes an embedded jupyter notebook for you to work on. Screenshot showing the embedded Notebook.

License

Kuenstliche Intelligenz in die Berufliche Bildung Bringen (KIB3) 2022 summer semester student project of University of Stuttgart

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see GNU license.

Additional resources

Development Team

  • Buchholz, Max
  • Günther, Ralph
  • Klaß, Robin
  • König, Solveigh
  • Marinic, Noah
  • Schüle, Maximilian
  • Stoll, Timo
  • Weber, Raphael
  • Wohlfart, Phillip
  • Zhang, Yichi
  • Zoller, Nick

developed this plugin in the context of the Student Project of University of Stuttgart in the Summer Semester 2022