Skip to content

Allow assignment and preview links to work in Jupyterhub environment outside iframe#1983

Open
xcompass wants to merge 1 commit intojupyter:mainfrom
ubc:fix/link-base-url
Open

Allow assignment and preview links to work in Jupyterhub environment outside iframe#1983
xcompass wants to merge 1 commit intojupyter:mainfrom
ubc:fix/link-base-url

Conversation

@xcompass
Copy link

@xcompass xcompass commented Feb 4, 2026

Currently, the generated links for assignment and preview are missing base_url when nbgrader is running under Jupyterhub and outside of iframe (e.g. new tab). The generated links are something like https://jupyter.example.com/tree/source/assignment1 instead of https://jupyter.exmple.com/jupyter/user/username/tree/source/assignment1, missing the base_url (/jupyter/user/username/) part.

This PR is to fix this issue and allow nbgrader to run under Jupyterhub as a separate tab/window. (this is for the use case where Jupyterhub instances that don't have subdomain enabled)

This PR doesn't affect the use cases for nbgrader running in Jupter notebook or lab. As in both cases, base_url are empty ("") and the flow goes to else branch in the linkTo function

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Binder 👈 Launch a Binder on branch ubc/nbgrader/fix%2Flink-base-url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant