jupyter / nbgrader

A system for assigning and grading notebooks
https://nbgrader.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.3k stars 318 forks source link

Double quotes in assignment name/`assignment_id` break some functionality #1509

Open enfascination opened 3 years ago

enfascination commented 3 years ago

Operating system

Ubuntu

nbgrader --version

Python version 3.6.7 | packaged by conda-forge | (default, Feb 28 2019, 09:07:38) [GCC 7.3.0] nbgrader version 0.7.0.dev

jupyterhub --version (if used with JupyterHub)

0.9.6

jupyter notebook --version

6.0.3

Expected behavior

On /formgrader/manage_submissions/<assignment_id> pages

  1. Individual student scores should appear in a table
  2. Under the "Instructions (click to expand)" heading a valid command line command should appear

On /formgrader/gradebook/<assignment_id> pages

  1. Individual student scores should appear in a table

Actual behavior

The above-mentioned command line command doesn't properly escape the double quotes in the assignment name The above-mentioned tables read Loading, please wait... The js console (in Chrome) for each affected page gives the error Uncaught ReferenceError: assignment_id is not defined at gradebook_notebooks.js:4

Steps to reproduce the behavior

Create an assignment name/assignment_id with double quotes in it and navigate to the above pages.

sigurdurb commented 2 years ago

What is your traitlets version? Traitlets does not require double quotes after version 5 so If you are using the latest nbgrader with traitlets below v.5, it might not work. Just a theory.

perllaghu commented 9 months ago

A late additional note here..... I would point the finger at the regexp used to discover userid etc from the file-path