Closed
Description
openedon Jul 15, 2022
Operating system
Ubuntu 20.04 within k8s single user pod spawned by jupyterhub pod.
nbgrader --version
nbgrader version 0.8.0a2
jupyterhub --version
(if used with JupyterHub)
Image jupyterhub is jupyterhub/k8s-hub:1.1.3-n616.he76e1e57
jupyter notebook --version
6.4.12
jupyter lab --version
3.4.3
Expected behavior
In JupyterLab, when logging in as an instructor:
Create Assignment
tab in the right sidebar is open when clicking on it, and it allows instructors to create assignments.
In JupyterLab, when logging in as a student:
Create Assignment
tab in the right sidebar should not appear, as students cannot create assignments.
Actual behavior
In JupyterLab, when logging in as an instructor:
Create Assignment
appears and allow instructors to create assignments.
In JupyterLab, when logging in as a student:
Create Assignment
tab in the right sidebar still appears, and shouldn't, as it allows students to create assignments.
Steps to reproduce the behavior
Next are relevant contents in Dockerfile to install nbgrader:
RUN \
pip install git+https://github.com/jupyter/nbgrader.git@v0.8.0a2 && \
clean-layer.sh
RUN \
/opt/conda/bin/jupyter server extension enable --sys-prefix --py nbgrader.server_extensions.formgrader && \
/opt/conda/bin/jupyter server extension enable --sys-prefix --py nbgrader.server_extensions.assignment_list && \
/opt/conda/bin/jupyter server extension enable --sys-prefix --py nbgrader.server_extensions.course_list && \
/opt/conda/bin/jupyter server extension enable --sys-prefix --py nbgrader.server_extensions.validate_assignment && \
/opt/conda/bin/jupyter labextension disable --level=sys_prefix nbgrader/create_assignment && \
/opt/conda/bin/jupyter labextension disable --level=sys_prefix nbgrader/formgrader && \
/opt/conda/bin/jupyter labextension enable --level=sys_prefix nbgrader/assignment-list && \
/opt/conda/bin/jupyter labextension disable --level=sys_prefix nbgrader/course-list && \
/opt/conda/bin/jupyter labextension enable --level=sys_prefix nbgrader/validate-assignment && \
clean-layer.sh
Later, at single user boot time (when spawned), a bootstrap script executes next:
### only instructors can create assignments
if [[ "${IS_INSTRUCTOR}" == "true" ]]; then
jupyter labextension enable --level=sys_prefix nbgrader/create_assignment
jupyter labextension enable --level=sys_prefix nbgrader/formgrader
fi
Metadata
Assignees
Labels
No labels
Activity