jupyter / nbgrader

A system for assigning and grading notebooks
https://nbgrader.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.29k stars 317 forks source link

Get nbgrader via jupyterhub to respect directory structure? #889

Closed reckoner closed 6 years ago

reckoner commented 7 years ago

Operating system

Ubuntu 16

nbgrader --version

nbgrader version 0.5.3

jupyterhub --version (if used with JupyterHub)

0.7.2

Notebook - Help, About version info

5.0.0

Expected behavior

I carefully followed the directory structure plan. I am able to get jupyterhub to spawn notebooks for the instructor and the students. That works great. The problem is that nbgrader seems to want the source directory to be in the root of the filesystem for the users (e.g., /home/instructor), even though the class materials are in /home/instructor/course100/source. This is a problem for using the buttons in the Jupyter Notebook to generate and distribute assignments because it seems as if those buttons are hard-wired to look for the root directories of the students and the instructor (e.g.,/home/student01) instead of using (or creating) /home/student01/course100/. I can get around this problem by shelling into the instance and running nbgrader from the commandline but that's not a good solution in general for the jupyterhub configuration I am trying to build.

Actual behavior

nbgrader wants everything to be in the $HOME directories of the instructor and students.

Steps to reproduce the behavior

Follow the wiki instructions to the letter and deploy with jupyterhub.

lgpage commented 7 years ago

@reckoner you can set the path in the ~/.jupyter/nbgrader_config.py file:

c.CourseDirectory.root = '/home/instructor/course100'
jhamrick commented 7 years ago

[Catching up on issues and PRs as I've been away for the last two months]

@reckoner Did setting the config option like @lgpage suggested help?

Apologies that it is so confusing getting the formgrader to work with JupyterHub in a different root directory---I will try to write up some more comprehensive documentation on the various ways that people might want to use the formgrader (without JupyterHub, different root directories, with JupyterHub, multiple classes, etc.)

jhamrick commented 6 years ago

@reckoner I am going to close this issue as there hasn't been any activity on it, but if you still have problems or need additional help please feel free to create a new issue!