-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add warning when course root is not accessible from notebook root #1012
Comments
Is there any reason you don't have your course set up as a managed service and then only allow certain users to that service? Let me know if you need any help if you decide to do that 💃 |
What do you mean by "not set up as a managed service"? (Preferably with links, please.) I am using the https://github.com/jupyterhub/jupyterhub-deploy-teaching repo, so I do have PAM authentication via JupyterHub. That is not the problem. The problem is that if there are multiple teachers, they cannot cooperate on a single assignment, because each can only work in their own home. If nbgrader root was in a place that all teachers can access (e.g. Of course, I kind of solved the problem by having |
Managed service is basically having a notebook server running under the /services url. For example:
Then you need the groups
Then only the users in testcourse_kenn are allowed to access the course on the path: /services/testcourse20183 |
Hmm, yeah, this has to do with the fact that nbgrader is running as part of the notebook server, which does not allow you to access notebooks outside of the directory where it is running. So it's not a limitation of the home directory itself, but a limitation that you cannot set the course directory to be outside the directory where the notebook server is running. To support having multiple graders with JupyterHub, the recommended way is indeed as @sigurdurb suggested to use a JupyterHub service, see the documentation here: https://nbgrader.readthedocs.io/en/master/configuration/jupyterhub_config.html#example-use-case-one-class-multiple-graders |
One thing we could potentially do is try to check if the root is being set outside the root of the notebook directory, and warn the user that this is not possible and point them to the relevant documentation for how to set up the JupyterHub service instead. |
Operating system
Ubuntu 16.04
nbgrader --version
0.5.4
jupyterhub --version
(if used with JupyterHub)0.8.1
jupyter notebook --version
5.6.0
Expected behavior
I set the
CourseDirectory.root
to/opt/submissions
. I expected that this would allow me to have multiple teachers work on the same course (adding students, creating assignments, etc). OK, I know that I should use a proper database for that, but it's a first step.Actual behavior
With one of the teacher users I could create an assignment. However, when I clicked on it to actually edit it and create the assignment notebook, I got a 404. The URL the system looked at was
/user/teacher/submissions/source/<assignment>/
.So it seems that somehow the
/opt
has become lost from the path, thesubmissions
part was kept and put after the default/user/teacher/
, which is the user's home.If I change the root path to
/home/teacher/nbgrader
, everything works and the url is/user/teacher/tree/nbgrader/source/<assignment>/
.Note that the db was created in
/opt/submissions
just fine, I could add users... it's just the formgrader that has this problem.Steps to reproduce the behavior
Just set
CourseDirectory.root
to outside the user's home directory.The text was updated successfully, but these errors were encountered: