nbgrader and jupyterhub

63 views
Skip to first unread message

Damien Polizzi

unread,
Oct 8, 2018, 6:37:00 AM10/8/18
to Project Jupyter
At first I want to apologize myself about my English level who's not very good...

I'm thinking about using jupyterhub and  more precisely nbgrader at the scale of one university. And I think there are missing things for simplifying the work for administrators and teacher.


  • At the beginning just a deal with account creation. When we create an account, the path for accessing to the notebook doesn't create itself. I think it's a little sad... And that the work for creating it automatically could be not very expensive as an option of the hub.
    • But ok I foud a way to do it, in adding just a repertory in /etc/skel, but if we doesn't like to create this into the /home/user but somewhere else it's impossible.
    • If a directory could be automatically created it could help a lot.
The next points are more difficult because they cause the use of new concepts in the db and the writing of new html pages
  • Next, when you've got your account, you want to use nbgrader. The first think I notice is that there could be just one course for a teacher (if you hope that they don't have to access directly to the server) because you have just this in the config :
    • c = get_config()
      c.Exchange.course_id = "ifa1"
      c.Exchange.root = "/tmp/ifa1"
    • Why not using some list (c.Echange.course_ids = [ifa1,ifa2] and just one directory for all the system, for exemple c.Exchange.root = "/tmp/jupyter_exchage") and that this directory could be automatically created by the system when its starts.
  • And then when you have courses you could have students who are just registered to a course in particular (exemple a student is into the course ifa1 and not in ifa2), but with the possibility to have students in both courses.
  • I think about a last think :
    •  what about disabling access to formgrader when you are a student, be cause a student doesn't have to create forms
    • and why a teacher has the right to fetch assignments ? it doesn't have sense to my point of view.
    • this cause to think about right management in the application
So thank you for reading, and I hope that it could be interesting for you

Damien Polizzi

unread,
Oct 8, 2018, 6:39:57 AM10/8/18
to Project Jupyter
I forgot to tell that this sort of think implies that the file nbgrader_config.py disapear and that the database manage this things

Damien Polizzi

unread,
Oct 8, 2018, 6:42:35 AM10/8/18
to Project Jupyter
And I forgot to tell that there could be multiple groups for the same course

Jessica B. Hamrick

unread,
Oct 8, 2018, 7:07:53 AM10/8/18
to Project Jupyter
Hi Damien,

Glad to hear you are thinking about using nbgrader!

> When we create an account, the path for accessing to the notebook doesn't create itself

Hmm, I'm not sure I totally understand. Are you talking about creating an account through JupyterHub or on the system itself?

> The first think I notice is that there could be just one course for a teacher


The idea here is that while you do need separate nbgrader instances (one per course), they can each be run as a separate service on JupyterHub. Each instructor then just needs to be granted access to the relevant courses they are teaching.

> And then when you have courses you could have students who are just registered to a course in particular (exemple a student is into the course ifa1 and not in ifa2), but with the possibility to have students in both courses.

The support for students in multiple classes is currently a bit minimal. Students can be in multiple classes, but they will be able to see assignments from all classes, even ones they are not enrolled in. See: https://nbgrader.readthedocs.io/en/master/user_guide/faq.html#can-i-use-the-assignment-list-extension-with-multiple-classes

> what about disabling access to formgrader when you are a student, be cause a student doesn't have to create forms

To do this you can uninstall the formgrader extension on the student accounts: https://nbgrader.readthedocs.io/en/master/user_guide/installation.html#disabling-extensions

> and why a teacher has the right to fetch assignments ? it doesn't have sense to my point of view.

Similarly, you can uninstall the assignment list extension on the instructor accounts: https://nbgrader.readthedocs.io/en/master/user_guide/installation.html#disabling-extensions (though I'll note it can be useful from the instructor stand point just to double check that the correct version of the assignment has been released)

Hope that helps!

Cheers,
Jess
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/32efa426-3a5f-4955-b3e5-da137507aedb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Damien Polizzi

unread,
Oct 8, 2018, 8:21:18 AM10/8/18
to Project Jupyter
Hello Jess, thank you for answering so quickly.

> Hmm, I'm not sure I totally understand. Are you talking about creating an account through JupyterHub or on the system itself?

I was talking about creating about creating an account on juoyterhub, because of when whith som particular config it creates for you an account on the system when it's the first time you connect :
=> for example with a CAS authenticator : c.CASLocalAuthenticator.create_system_users = True
it creates you an account but not the directory for using it. And then you have to create it manually otherwise one error is thrown. That's why to avoid this I added a folder in the skel directory (but it's seems to be, for me too much homemade)


>The idea here is that while you do need separate nbgrader instances (one per course), they can each be run as a separate service on JupyterHub. Each instructor then just needs to be granted access to the relevant courses they are teaching.

Its ok and I think that this idea of one course by service is great.
If I understand, if I need to access to the first course, I use the first address (whith the port 9999) and that for the 2nd the access will be by the port 9998. Am I right ?
And the students do the same ? And tell me if it's ok, when you connect with the port 9999, you execute the nbgrader_config.py witch is in the /home/grader-course123/.jupyter/nbgrader_config.py directory ?

But if you cannot control witch student is connecting to witch course, how to do during tests ? in order to avoid cheating...

The other problem I meant, is to use groups, because a group can be driven by a teacher and one other by another teacher.
And some groups who have tests (for example, one group have a test from 10 to 11h, and the second from 11 to 10, we cannot give them the same tests because they could have seeing it during the other where making the test)
Do you understand what I say ?

Jessica B. Hamrick

unread,
Oct 8, 2018, 10:54:31 AM10/8/18
to Project Jupyter
Hi Damien,

> I was talking about creating about creating an account on juoyterhub

Ok, I think that is then an issue with that particular authenticator if it's not creating home directories---but also I think the generally accepted way to create default home directories is with using /etc/skel as a template, so I would think that's an acceptable solution. (At least that's also what I did when I previously used JupyterHub + nbgrader).

> if I need to access to the first course, I use the first address (whith the port 9999) and that for the 2nd the access will be by the port 9998. Am I right ?

Not exactly---the services can be accessed at the /services/<service_name> route. For example, if your JupyterHub instance is running at 192.168.0.1:8000, and you have a service called course101, then you would access it at 192.168.0.1:8000/services/course101 . However, this is only something that will be accessed by the instructors---students never need to do anything special. They just need to have the Assignment List extension installed (with access to the shared exchange directory) and then they will access their notebook servers as normal.

> But if you cannot control witch student is connecting to witch course

No, as I mentioned above students can see assignments from all courses. Fixing this is on the todo list but unlikely to happen in the super near future, unfortunately.

> The other problem I meant, is to use groups, because a group can be driven by a teacher and one other by another teacher.
> And some groups who have tests (for example, one group have a test from 10 to 11h, and the second from 11 to 10, we cannot give them the same tests because they could have seeing it during the other where making the test)
> Do you understand what I say ?

Hmm, I see. Unfortunately, I don't think this is something that will work with nbgrader as it's not really designed with that kind of access control in mind. It might be possible to do this in the future once we have better access control over courses but for the moment it's unfortunately out of scope.

Cheers,
Jess


Damien Polizzi

unread,
Oct 8, 2018, 11:16:44 AM10/8/18
to Project Jupyter
Thank you for your answers Jess

I have to know all about that, because I discover jupyter last year, and I thought it was really a great think. Now a few week ago I begin to interest myself on jupyterhub and how distribute notebooks to students. In searching in this directory I found nbgrader.

Now I think that nbgrader is very great and that I can not thinking about student without it. For notation perhaps (but I see that the security is probably too low) , but I think now much as just controlling the level of the student and seeing what they've understood or not.

For the moment I will try to make some trials to show to teachers in my engineering school and why not mounting a project, for all the school.

In this way, I'm searching how to do it, giving the minimum of work for administrators. And I have to tell to teachers what they could do or not.
Thank you for your time !
Friendly

Damien
Reply all
Reply to author
Forward
0 new messages