Closed goekce closed 7 months ago
Solved🎉 . The group name used in formgrade-*
must match the course id created with nbgrader quickstart
. In my case course
!= test
caused a problem.
Multi-instructor or multi-class setting involves the integration of permissions to authenticate access to different courses compared to a single course + single instructor setting. This difference lays many stumbling stones. High-level API + print debugging was useful.
To answer my questions:
nbgrader
CLI tool, e.g., nbgrader --NbGrader.logfile=test.log --NbGrader.log_level=DEBUG list
. I could not find a way to enable it on the jupyter server.# Do not forget
# `nbgrader quickstart course`
#
from nbgrader.apps import NbGraderAPI
from traitlets.config import Config
from nbgrader.auth import JupyterHubAuthPlugin
c = Config()
c.Exchange.path_includes_course = True
c.Authenticator.plugin_class = JupyterHubAuthPlugin
c.CourseDirectory.root = '/home/course/course'
c.CourseDirectory.course_id = "course"
c.Exchange.root = "/home/exchange"
api = NbGraderAPI(config=c)
api.generate_assignment('ps1')
api.release_assignment('ps1')
api.get_released_assignments()
When the api
gets initialized, it calls:
Which in turn sets:
In my case course-id of the assignment did not match the course-id of the service user which is checked here:
Improvement idea: The same check during get_released_assignments()
could be also in included in release_assignment.py
.
If one of the maintainers confirms this problem and this is worth implementing, I can open a new issue.
Operating system
ArchLinux
nbgrader --version
0.9.2
jupyterhub --version
(if used with JupyterHub)4.0.2
jupyter notebook --version
7.1.2
Expected behavior
Formgrader page shows the assignment in
released
state.Actual behavior
Formgrader page shows the assignment in
draft
state even the assignment is released.Steps to reproduce the behavior
nbgrader quickstart
in the service directoryThe assignment will be still in
draft
state. Releasing it again will throw an error that the directory exists./etc/jupyter/nbgrader_config.py
/home/course/.jupyter/nbgrader_config.py
--debug
. Could enablingNbGrader.logfile
help? If yes, how should I enable it? Could not find in the documentation, where I can setNbGrader.logfile
.