Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Human readable course titles for multi-class nbgrader on JupyterHub #1797

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jeflem
Copy link

@jeflem jeflem commented Jul 5, 2023

Course list and assignment list extensions show nbgrader's course_id (and/or the formgrader service's name) in the GUI. A course's course_id property has to be (at least) URL save if nbgrader is running in a multi-class JupyterHub setting. Thus, no white space, no specical characters (German umlauts, Chinese,...) allowed.

This PR adds a course_title property to nbgrader courses and modifies course list and assignment list extensions (server/lab/nb) to show course_title where appropriate. Using course_title for GUI (and for nothing else) allows for arbitrary course titles.

If the new course_title property is not set, then behavior is as before (show course_id). In single-class environments set c.CourseDirectory.course_title to some string. In multi-class JupyterHub environments set

c.NbGrader.course_titles = {
    'course_id_1': 'Title of Course 1',
    'course_id_2': 'Title of Course 2'
}

This PR closes #1795.

Tests pass.

Would be great if someone could carefully review this PR. It's my first contribution to nbgrader, maybe I missed something important.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

Binder 👈 Launch a Binder on branch jeflem/nbgrader/course_titles

@lahwaacz
Copy link
Contributor

lahwaacz commented Aug 5, 2023

The nbgrader/nbextensions directory is gone on the main branch, so this will need to be updated for the 0.9.x version

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.

Introduce (human readable) course titles in addition to course IDs
2 participants