You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an Ubuntu Server hosting The Littlest Jupyter Hub (tljh) and am trying to set up nbgrader for multiple instructors with different classes.
I have gotten the formgrader working and have been able to do a manual exchange of assignments between students and instructors. I am having issues with getting the internal exchange working between students and instructors, however. When I use the command line as student1:
nbgrader fetch_assignment ps1 --course c1
I am told "You do not have access to this course"
I have tried following the documentation here and have tried referencing the demo github here
When releasing assignments they do go into the exchange and have the proper setup.
I really have no idea what to do further or what I may have messed up along the way.
I have 2 nbgrader_config.py files and 1 jupyterhub_config.py file.
The following are my config files
~/jupyter/jupyter_config.py
c = get_config()
#formgrader
c.JupyterHub.NotebookApp.tornado_settings = {
'headers': {
'Content-Security-Policy': "frame-ancestors 'self'"
}
}
# Our user list
c.Authenticator.allowed_users = [
'jupyter-bradp',
'jupyter-dakoop',
'jupyter-professor1',
'jupyter-student1',
'jupyter-student2',
'jupyter-student3',
]
c.Authenticator.admin_users = {
'jupyter-bradp',
'jupyter-dakoop',
'jupyter-professor1',
}
# instructor1 and instructor2 have access to different shared servers:
c.JupyterHub.load_groups = {
'instructors' = [
'jupyter-bradp',
'jupyter-professor1',
],
'formgrade-c1': [
'jupyter-bradp',
],
'formgrade-course123':[
'jupyter-professor1',
],
'nbgrader-c1': [
'jupyter-bradp',
'jupyter-student1',
],
'nbgrader-course123': [],
}
for course in ['c1']:
roles.append(
'name':f'formgrade-{course}',
'groups':[f'formgrade-{course}'],
'scopes':[
f'access:services!service={course}',
]
)
#course material access
roles.append(
{
'name':f'nbgrader-{course}',
'groups':[f'nbgrader-{course}'],
'scopes':[
'list:services',
f'read:services!service={course}',
],
}
)
# Start the notebook server as a service. The port can be whatever you want
# and the group has to match the name of the group defined above.
c.JupyterHub.services = [
{
'name': 'c1',
'url': 'http://127.0.0.1:9999',
'command': [
'jupyterhub-singleuser',
'--group=formgrade-c1',
'--debug',
],
'user': 'jupyter-bradp',
'cwd': '/home/jupyter-bradp/c1',
'api_token': token, # include api token from admin user
},
{
'name': 'course123',
'url': 'http://127.0.0.1:9998',
'command': [
'jupyterhub-singleuser',
'--group=formgrade-course123',
'--debug',
],
'user': 'grader-course123',
'cwd': '/home/grader-course123',
'api_token': token # include api token from admin user
},
]
~/jupyter/nbgrader_config.py (This is the global nbgrader config file)
from nbgrader.auth import JupyterHubAuthPlugin
c = get_config()
c.Exchange.path_includes_course = True
c.Authenticator.plugin_class = JupyterHubAuthPlugin
@BradPohl from the documentation, the global config file can also be placed in a global location, which makes sense for a server installation:
On the nbgrader side of things, activating the JupyterHubAuthPlugin requires you to add it as an authentication plugin class into the nbgrader_config.py for all accounts. This is easiest to do by putting it in a global location such as /etc/jupyter/nbgrader_config.py
I have an Ubuntu Server hosting The Littlest Jupyter Hub (tljh) and am trying to set up nbgrader for multiple instructors with different classes.
I have gotten the formgrader working and have been able to do a manual exchange of assignments between students and instructors. I am having issues with getting the internal exchange working between students and instructors, however. When I use the command line as student1:
I am told "You do not have access to this course"
I have tried following the documentation here and have tried referencing the demo github here
When releasing assignments they do go into the exchange and have the proper setup.
I really have no idea what to do further or what I may have messed up along the way.
I have 2 nbgrader_config.py files and 1 jupyterhub_config.py file.
The following are my config files
~/jupyter/jupyter_config.py
~/jupyter/nbgrader_config.py (This is the global nbgrader config file)
~/home/jupyter-bradp/c1/nbgrader_config.py
The text was updated successfully, but these errors were encountered: