jupyter / nbgrader

A system for assigning and grading notebooks

Home Page:https://nbgrader.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Student Name None,None in Formgrader Submissions View

swissarthurfreeman opened this issue · comments

Operating system

Ubuntu 22.04 LTS in docker

nbgrader --version

Python version 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
nbgrader version 0.8.4

jupyterhub --version (if used with JupyterHub)

4.0.2

jupyter lab --version

3.6.5

Expected behavior

When a user submits a notebook, the submission should have a firstname lastname that makes sense, or none at all.

Actual behavior

Formgrader insists on creating displaying an additional column Student Name, that contains a clickable link that goes to the studend id's submission, the value of this cell is always None, None. It is unclear how the student can populate these values for it to be clearer to the instruc
None,None Student Name Submission
tor.

Steps to reproduce the behavior

Use the deployment at this link, create a new assignement from the instructor view and release or release the quickstart one by accessing /services/course101 and logging in as instructor (same password and username). From the student view, (in a private tab, access localhost:8000 and login as student1 username and password), fetch problem set 1, modify it and submit it, then from the instructor1 view, collect and click on collected number. You'll see the None,None submissions view.

@brichet any ideas ?

For what I understand, the student name must be filled by the instructor. I don't think students can populate it.

These value can be filled either using the formgrader interface, in the Manage Students section, or using the CLI:
nbgrader db student add student1 --first-name studentFirstName --last-name studentLastName

Right, we have a class of about 500 students, is one meant to manually populate this for every single one...?
Is there really no way for a student to populate this ?

Hi @swissarthurfreeman,

at our university we use LTI to synchronize user data between nbgrader and our learning management system (LMS). Nbgrader gets names and email from the LMS and sends scores back to the LMS. All major LMS (Moddle, Canvas,...) support LTI.

Don't know whether this is an option for you. If so, I could provide some hints and code to get this running.

Best regards,

Jens

Heya @jeflem,

Indeed we use moodle, so if I understand correctly : when using LTI nbgrader is able to retrieve the firstname, lastname claims from the HTTP requests provided by LTI and populates the nbgrader database like so ?

Best,

Arthur

Hi @swissarthurfreeman,

nbgrader itself has no LTI interface. But for JupyterHub there is the LTIAuthenticator, which allows login to JupyterHub via Moodle (and other LMS). All the data provided by Moodle (name, email, role (instructor/learner), course title and much more) then is available in JupyterHub. In jupyterhub_config.py you may use the c.Authenticator.post_auth_hook config variable to do whatever you want with the LTI data. For instance, you could feed it into nbgrader's data base whenever a student comes to the hub.

Some days ago coworkers and me published our code on GitHub. It's a complete Jupyter distribution with nbgrader and LTI integration. Maybe more than you need, but you'll find the relevant code snippets there in images/ananke-nbgrader/assets/kore/kore_jhub_config.py.

If this is too off-topic for this issue, feel free to write an email to me (see README.md in above repo for email contact).

Best redards,

Jens

For what I understand, the student name must be filled by the instructor. I don't think students can populate it.

These value can be filled either using the formgrader interface, in the Manage Students section, or using the CLI: nbgrader db student add student1 --first-name studentFirstName --last-name studentLastName

This workflow makes sense when the instructor manages a class on their own laptop/workstation. It does not make much sense when nbgrader is used on JupyterHub where the information about all students is presumably available from the accounts in the operating system itself.

@swissarthurfreeman is it working with the LTI authenticator of Jupyterhub ?

@brichet The functionality should not depend on JupyterHub authenticator. Or rather, the information may be located elsewhere depending on the authenticator. For example, with the PAMAuthenticator, the full user name may be expected to be in the GECOS field on the system. So the question is how to make it available to nbgrader.