From e67b935917037d3de6e5e5050538f85f85097efc Mon Sep 17 00:00:00 2001 From: sverhoeven Date: Mon, 22 Jan 2024 13:06:56 +0100 Subject: [PATCH 1/6] Add files for trying out nbgrader single user + multi user --- demo/Dockerfile | 23 ++++++++++++++++++++ demo/README.md | 50 +++++++++++++++++++++++++++++++++++++++++++ demo/requirements.txt | 2 ++ 3 files changed, 75 insertions(+) create mode 100644 demo/Dockerfile create mode 100644 demo/README.md create mode 100644 demo/requirements.txt diff --git a/demo/Dockerfile b/demo/Dockerfile new file mode 100644 index 0000000..53f0100 --- /dev/null +++ b/demo/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:22.04 +ENV DEBIAN_FRONTEND=noninteractive +ENV NODE_VERSION=16.17.1 + +RUN apt-get update \ + && apt-get -y dist-upgrade \ + && apt-get -y install git sudo curl + +# cache some of the bigger installs +RUN apt-get -y install python3-pip npm +RUN python3 -m pip install --upgrade jupyterhub + +# Install nodejs v16 (not available yet on apt). +ENV NVM_DIR=/root/.nvm +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash +RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} +RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} +RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} +ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}" + +RUN git clone https://github.com/jupyter/nbgrader /srv/nbgrader/nbgrader +WORKDIR /srv/nbgrader/nbgrader/demos +CMD ./restart_demo.sh demo_multiple_classes diff --git a/demo/README.md b/demo/README.md new file mode 100644 index 0000000..8fb580a --- /dev/null +++ b/demo/README.md @@ -0,0 +1,50 @@ +# Testing out nbgrader quickstart + +```shell +python3 -m venv venv +pip install -r requirements.txt +mkdir exchange +``` + +```shell +nbgrader quickstart hydro-mod-1 +cd hydro-mod-1 +``` + +To `nbgrader_config.py` add `c.Exchange.root = "/../exchange" +` + +``` +jupyter lab +``` + +## Create student version + +```shell +mkdir -p submitted/student1 +cp -r release/* submitted/student1/ +``` + +## JupyterHub + +Follow https://nbgrader.readthedocs.io/en/stable/configuration/jupyterhub_config.html#example-use-case-multiple-classes +and +https://github.com/jupyter/nbgrader/tree/main/demos/demo_multiple_classes + +``` +docker build -t nbgraderhub . +docker run -p 8000:8000 -p 9999:9999 nbgraderhub +``` + +Goto http://localhost:8000 + +Login with +* instructor1: instructor1 +* student1: student1 + +# TODO + +* JupyterHub +* Multiple users +* Multiple courses +* R diff --git a/demo/requirements.txt b/demo/requirements.txt new file mode 100644 index 0000000..ca0093e --- /dev/null +++ b/demo/requirements.txt @@ -0,0 +1,2 @@ +jupyterlab +nbgrader From 76c7e5eca1c5136300e1ecee6f3efc02840ab7fd Mon Sep 17 00:00:00 2001 From: sverhoeven Date: Mon, 22 Jan 2024 13:10:04 +0100 Subject: [PATCH 2/6] Typo --- demo/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/README.md b/demo/README.md index 8fb580a..b557b65 100644 --- a/demo/README.md +++ b/demo/README.md @@ -33,7 +33,7 @@ https://github.com/jupyter/nbgrader/tree/main/demos/demo_multiple_classes ``` docker build -t nbgraderhub . -docker run -p 8000:8000 -p 9999:9999 nbgraderhub +docker run -p 8000:8000 nbgraderhub ``` Goto http://localhost:8000 From 55e079a55c706a7fedcdefbab9d464de45c35a30 Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Mon, 22 Jan 2024 13:42:58 +0100 Subject: [PATCH 3/6] Update technology_stack.md --- technology_stack.md | 1 + 1 file changed, 1 insertion(+) diff --git a/technology_stack.md b/technology_stack.md index 19a31a6..f58299e 100644 --- a/technology_stack.md +++ b/technology_stack.md @@ -24,6 +24,7 @@ https://okpy.org/ CoCalc is a virtual online workspace for calculations, research, collaboration and authoring documents. Your web browser is all you need to escape the confined space of your desktop and move to the cloud. This guide explains the features of CoCalc in depth and shows how you can use them productively. https://cocalc.com/ +https://github.com/sagemathinc/cocalc # e2x From 7d549a3ece839bb332604634f43859ee8532f156 Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Mon, 22 Jan 2024 13:49:48 +0100 Subject: [PATCH 4/6] Update README.md --- demo/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/demo/README.md b/demo/README.md index b557b65..752e112 100644 --- a/demo/README.md +++ b/demo/README.md @@ -44,7 +44,9 @@ Login with # TODO -* JupyterHub -* Multiple users -* Multiple courses +* [x] JupyterHub +* [x] Multiple users +* [x] Multiple courses * R +* oauth or user sync +* From 217d40d77d934cec54b01ff09456ca2554a05af5 Mon Sep 17 00:00:00 2001 From: sverhoeven Date: Tue, 13 Feb 2024 13:23:35 +0100 Subject: [PATCH 5/6] fix dep bug --- demo/Dockerfile | 2 +- demo/README.md | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/demo/Dockerfile b/demo/Dockerfile index 53f0100..01cb5b6 100644 --- a/demo/Dockerfile +++ b/demo/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get update \ # cache some of the bigger installs RUN apt-get -y install python3-pip npm -RUN python3 -m pip install --upgrade jupyterhub +RUN python3 -m pip install --upgrade pip jupyterhub # Install nodejs v16 (not available yet on apt). ENV NVM_DIR=/root/.nvm diff --git a/demo/README.md b/demo/README.md index 752e112..66b0a7a 100644 --- a/demo/README.md +++ b/demo/README.md @@ -42,6 +42,18 @@ Login with * instructor1: instructor1 * student1: student1 +To edit assignemt +1. As instructor1 +1. Goto Nbgrader -> Courses -> select course101 +1. Authorize yourself +1. You can now edit the ps1 assigment in Formgrader + +To fetch assigment + +1. As student1 +1. Goto Nbgrader -> Assignment list +1. Fetch ps1 + # TODO * [x] JupyterHub From 5bc61edf010ca44bb1efe899439e3838cd3e6552 Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Tue, 13 Feb 2024 15:57:11 +0100 Subject: [PATCH 6/6] add con for e2xgrader --- technology_stack.md | 1 + 1 file changed, 1 insertion(+) diff --git a/technology_stack.md b/technology_stack.md index 32a45f5..a3e81eb 100644 --- a/technology_stack.md +++ b/technology_stack.md @@ -38,6 +38,7 @@ https://github.com/sagemathinc/cocalc * https://github.com/DigiKlausur/e2xhub - A JupyterHub extension for simplifying course management for teaching and exams * https://github.com/DigiKlausur/e2xgrader - e2xgrader is an add-on for nbgrader that adds functionality for teachers and students. e2xgrader introduces new cell types and tools for graders (per question grading view, authoring component, pen-based grading) and students (assignment toolbar, exam toolbar, restricted notebook extension). + * notebook extension, not a lab extension # Brightspace