diff --git a/nbgrader/coursedir.py b/nbgrader/coursedir.py
index 26207215..978afb3f 100644
--- a/nbgrader/coursedir.py
+++ b/nbgrader/coursedir.py
@@ -4,7 +4,7 @@ import re
 from textwrap import dedent
 
 from traitlets.config import LoggingConfigurable
-from traitlets import Unicode, List, default
+from traitlets import Unicode, List, default, validate, TraitError
 
 from .utils import full_split, parse_utc
 
@@ -42,6 +42,12 @@ class CourseDirectory(LoggingConfigurable):
         )
     ).tag(config=True)
 
+    @validate('assignment_id')
+    def _validate_assignment_id(self, proposal):
+        if '+' in proposal['value']:
+            raise TraitError('Assignment names should not contain the following characters: +')
+        return proposal['value']
+
     notebook_id = Unicode(
         "*",
         help=dedent(
diff --git a/nbgrader/server_extensions/formgrader/static/js/manage_assignments.js b/nbgrader/server_extensions/formgrader/static/js/manage_assignments.js
index e8e68b1f..dd2757e3 100644
--- a/nbgrader/server_extensions/formgrader/static/js/manage_assignments.js
+++ b/nbgrader/server_extensions/formgrader/static/js/manage_assignments.js
@@ -395,6 +395,15 @@ var createAssignmentModal = function () {
             modal.modal('hide');
             return;
         }
+        if (name.indexOf("+") != -1) {
+            var err = $("#create-error");
+            err.text("Assignment names may not include the '+' character.");
+            err.show();
+            return;
+        } else {
+            var err = $("#create-error");
+            err.hide();
+        }
 
         var model = new Assignment({
             "name": name,
@@ -417,19 +426,22 @@ var createAssignmentModal = function () {
         modal.modal('hide');
     };
 
-    var body = $("<table/>").addClass("table table-striped form-table");
+    var body = $("<p/>")
+    body.append($("<p id='create-error' class='alert alert-danger' style='display: none'/>"));
+    var table = $("<table/>").addClass("table table-striped form-table");
+    body.append(table)
     var name = $("<tr/>");
-    body.append(name);
+    table.append(name);
     name.append($("<td/>").addClass("align-middle").text("Name"));
     name.append($("<td/>").append($("<input/>").addClass("name").attr("type", "text").attr("size", "31")));
 
     var duedate = $("<tr/>");
-    body.append(duedate);
+    table.append(duedate);
     duedate.append($("<td/>").addClass("align-middle").text("Due date (optional)"));
     duedate.append($("<td/>").append($("<input/>").addClass("duedate").attr("type", "datetime-local")));
 
     var timezone = $("<tr/>");
-    body.append(timezone);
+    table.append(timezone);
     timezone.append($("<td/>").addClass("align-middle").text("Timezone as UTC offset (optional)"));
     timezone.append($("<td/>").append($("<input/>").addClass("timezone").attr("type", "text")));
 

Assignment names with a '+' character break autograding
I (perhaps foolishly) created an assignment with a '+' character in its name (the web interface did not complain). Now nbgrader will not autograde submitted assignments. From the log file, I gather that the + character is used as a separator between student id and assignment name.

Does anyone know of a workaround that lets me autograde assignments that have already been submitted?

Regards,
Axel


### Operating system
Kubuntu Linux 16.04.3 LTS

### `nbgrader --version`
Python version 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609]
nbgrader version 0.5.4

### `jupyterhub --version` (if used with JupyterHub)
0.8.1

### `jupyter notebook --version` 
5.4.0

### Expected behavior
`nbgrader autograde PHY332-08-Charge+Plate_Free_Fall`should autograde submitted assignments

### Actual behavior
Autograding fails; .nbgrader.log says

```
[AutogradeApp | INFO] Copying /home/axel/PHY332/submitted/doe1j+PHY332-08-Charge/PHY332-08-Charge+Plate_Free_Fall/timestamp.txt -> /home/axel/PHY332/autograded/doe1j+PHY332-08-Charge/PHY332-08-Charge+Plate_Free_Fall/timestamp.txt
[AutogradeApp | INFO] Copying /home/axel/PHY332/submitted/doe1j+PHY332-08-Charge/PHY332-08-Charge+Plate_Free_Fall/image_charge.png -> /home/axel/PHY332/autograded/doe1j+PHY332-08-Charge/PHY332-08-Charge+Plate_Free_Fall/image_charge.png
[AutogradeApp | ERROR] No student with ID 'doe1j+PHY332-08-Charge' exists in the database
[AutogradeApp | ERROR] There was an error processing assignment: /home/axel/PHY332/submitted/doe1j+PHY332-08-Charge/PHY332-08-Charge+Plate_Free_Fall
[AutogradeApp | ERROR] Traceback (most recent call last):
      File "/usr/local/lib/python3.5/dist-packages/nbgrader/api.py", line 1122, in find_student
        .filter(Student.id == student_id)\
      File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/orm/query.py", line 2843, in one
        raise orm_exc.NoResultFound("No row was found for one()")
    sqlalchemy.orm.exc.NoResultFound: No row was found for one()
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.5/dist-packages/nbgrader/converters/autograde.py", line 78, in init_assignment
        gb.find_student(student_id)
      File "/usr/local/lib/python3.5/dist-packages/nbgrader/api.py", line 1125, in find_student
        raise MissingEntry("No such student: {}".format(student_id))
    nbgrader.api.MissingEntry: No such student: doe1j+PHY332-08-Charge
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.5/dist-packages/nbgrader/converters/base.py", line 289, in convert_notebooks
        self.init_assignment(gd['assignment_id'], gd['student_id'])
      File "/usr/local/lib/python3.5/dist-packages/nbgrader/converters/autograde.py", line 82, in init_assignment
        raise NbGraderException(msg)
    nbgrader.converters.base.NbGraderException: No student with ID 'doe1j+PHY332-08-Charge' exists in the database



```

### Steps to reproduce the behavior
1. Create assignment with `+` in its name, e.g. `PHY332-08-Charge+Plate_Free_Fall`
2. Collect submitted assignments using `nbgrader collect PHY332-08-Charge+Plate_Free_Fall --update`
3. Attempt to autograde with `nbgrader autograde PHY332-08-Charge+Plate_Free_Fall`
diff --git a/nbgrader/tests/apps/test_nbgrader_assign.py b/nbgrader/tests/apps/test_nbgrader_assign.py
index 73575ef2..c39d91db 100644
--- a/nbgrader/tests/apps/test_nbgrader_assign.py
+++ b/nbgrader/tests/apps/test_nbgrader_assign.py
@@ -1,6 +1,7 @@
 import os
 import sys
 import pytest
+import traitlets
 
 from os.path import join
 from sqlalchemy.exc import InvalidRequestError
@@ -44,6 +45,13 @@ class TestNbGraderAssign(BaseTestApp):
         run_nbgrader(["assign", "ps1"])
         assert os.path.isfile(join(course_dir, "release", "ps1", "foo.ipynb"))
 
+    def test_single_file_bad_assignment_name(self, course_dir, temp_cwd):
+        """Test that an error is thrown when the assignment name is invalid."""
+        self._empty_notebook(join(course_dir, 'source', 'foo+bar', 'foo.ipynb'))
+        with pytest.raises(traitlets.TraitError):
+            run_nbgrader(["assign", "foo+bar", "--create"])
+        assert not os.path.isfile(join(course_dir, "release", "foo+bar", "foo.ipynb"))
+
     def test_multiple_files(self, course_dir):
         """Can multiple files be assigned?"""
         self._empty_notebook(join(course_dir, 'source', 'ps1', 'foo.ipynb'))
diff --git a/nbgrader/tests/nbextensions/test_formgrader.py b/nbgrader/tests/nbextensions/test_formgrader.py
index 5fcabca8..772a252f 100644
--- a/nbgrader/tests/nbextensions/test_formgrader.py
+++ b/nbgrader/tests/nbextensions/test_formgrader.py
@@ -825,7 +825,7 @@ def test_add_new_assignment(browser, port, gradebook):
     # set the name and dudedate
     elem = browser.find_element_by_css_selector("#add-assignment-modal .name")
     elem.click()
-    elem.send_keys("ps2")
+    elem.send_keys("ps2+a")
     elem = browser.find_element_by_css_selector("#add-assignment-modal .duedate")
     elem.click()
     elem.send_keys("2017-07-05T17:00")
@@ -833,6 +833,16 @@ def test_add_new_assignment(browser, port, gradebook):
     elem.click()
     elem.send_keys("UTC")
 
+    # click save and wait for the error message to appear
+    utils._click_element(browser, "#add-assignment-modal .save")
+    WebDriverWait(browser, 10).until(EC.visibility_of_element_located((By.CSS_SELECTOR, "#create-error")))
+
+    # set a valid name
+    elem = browser.find_element_by_css_selector("#add-assignment-modal .name")
+    elem.clear()
+    elem.click()
+    elem.send_keys("ps2")
+
     # click save and wait for the modal to close
     utils._click_element(browser, "#add-assignment-modal .save")
     modal_not_present = lambda browser: browser.execute_script("""return $("#add-assignment-modal").length === 0;""")

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-rerunfailures coverage selenium invoke sphinx codecov cov-core pytest
apt-get update apt-get install -y gcc
3.6
dev-requirements.txt dev-requirements-windows.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
alembic==1.7.7
anyio==3.6.2
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
async-generator==1.10
attrs==22.2.0
Babel==2.11.0
backcall==0.2.0
bleach==4.1.0
certifi==2021.5.30
cffi==1.15.1
charset-normalizer==2.0.12
codecov==2.1.13
comm==0.1.4
contextvars==2.4
cov-core==1.15.0
coverage==6.2
dataclasses==0.8
decorator==5.1.1
defusedxml==0.7.1
docutils==0.18.1
entrypoints==0.4
greenlet==2.0.2
idna==3.10
imagesize==1.4.1
immutables==0.19
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig==1.1.1
invoke==2.2.0
ipykernel==5.5.6
ipython==7.16.3
ipython-genutils==0.2.0
ipywidgets==7.8.5
jedi==0.17.2
Jinja2==3.0.3
json5==0.9.16
jsonschema==3.2.0
jupyter==1.1.1
jupyter-client==7.1.2
jupyter-console==6.4.3
jupyter-core==4.9.2
jupyter-server==1.13.1
jupyterlab==3.2.9
jupyterlab-pygments==0.1.2
jupyterlab-server==2.10.3
jupyterlab_widgets==1.1.11
Mako==1.1.6
MarkupSafe==2.0.1
mistune==0.8.4
nbclassic==0.3.5
nbclient==0.5.9
nbconvert==6.0.7
nbformat==5.1.3
-e git+https://github.com/jupyter/nbgrader.git@97909fa3e4f358aa3b79e2a079d8a8a595d51119#egg=nbgrader
nbval==0.10.0
nest-asyncio==1.6.0
notebook==6.4.10
packaging==21.3
pandocfilters==1.5.1
parso==0.7.1
pexpect==4.9.0
pickleshare==0.7.5
pluggy==1.0.0
prometheus-client==0.17.1
prompt-toolkit==3.0.36
ptyprocess==0.7.0
py==1.11.0
pycparser==2.21
pyenchant==3.2.2
Pygments==2.14.0
pyparsing==3.1.4
pyrsistent==0.18.0
pytest==7.0.1
pytest-cov==4.0.0
pytest-rerunfailures==10.3
python-dateutil==2.9.0.post0
pytz==2025.2
pyzmq==25.1.2
requests==2.27.1
selenium==3.141.0
Send2Trash==1.8.3
six==1.17.0
sniffio==1.2.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinx-rtd-theme==2.0.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sphinxcontrib-spelling==7.7.0
SQLAlchemy==1.4.54
terminado==0.12.1
testpath==0.6.0
tomli==1.2.3
tornado==6.1
traitlets==4.3.3
typing_extensions==4.1.1
urllib3==1.26.20
wcwidth==0.2.13
webencodings==0.5.1
websocket-client==1.3.1
widgetsnbextension==3.6.10
zipp==3.6.0

name: nbgrader
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - alembic==1.7.7
      - anyio==3.6.2
      - argon2-cffi==21.3.0
      - argon2-cffi-bindings==21.2.0
      - async-generator==1.10
      - attrs==22.2.0
      - babel==2.11.0
      - backcall==0.2.0
      - bleach==4.1.0
      - cffi==1.15.1
      - charset-normalizer==2.0.12
      - codecov==2.1.13
      - comm==0.1.4
      - contextvars==2.4
      - cov-core==1.15.0
      - coverage==6.2
      - dataclasses==0.8
      - decorator==5.1.1
      - defusedxml==0.7.1
      - docutils==0.18.1
      - entrypoints==0.4
      - greenlet==2.0.2
      - idna==3.10
      - imagesize==1.4.1
      - immutables==0.19
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - invoke==2.2.0
      - ipykernel==5.5.6
      - ipython==7.16.3
      - ipython-genutils==0.2.0
      - ipywidgets==7.8.5
      - jedi==0.17.2
      - jinja2==3.0.3
      - json5==0.9.16
      - jsonschema==3.2.0
      - jupyter==1.1.1
      - jupyter-client==7.1.2
      - jupyter-console==6.4.3
      - jupyter-core==4.9.2
      - jupyter-server==1.13.1
      - jupyterlab==3.2.9
      - jupyterlab-pygments==0.1.2
      - jupyterlab-server==2.10.3
      - jupyterlab-widgets==1.1.11
      - mako==1.1.6
      - markupsafe==2.0.1
      - mistune==0.8.4
      - nbclassic==0.3.5
      - nbclient==0.5.9
      - nbconvert==6.0.7
      - nbformat==5.1.3
      - nbval==0.10.0
      - nest-asyncio==1.6.0
      - notebook==6.4.10
      - packaging==21.3
      - pandocfilters==1.5.1
      - parso==0.7.1
      - pexpect==4.9.0
      - pickleshare==0.7.5
      - pluggy==1.0.0
      - prometheus-client==0.17.1
      - prompt-toolkit==3.0.36
      - ptyprocess==0.7.0
      - py==1.11.0
      - pycparser==2.21
      - pyenchant==3.2.2
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pyrsistent==0.18.0
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - pytest-rerunfailures==10.3
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyzmq==25.1.2
      - requests==2.27.1
      - selenium==3.141.0
      - send2trash==1.8.3
      - six==1.17.0
      - sniffio==1.2.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinx-rtd-theme==2.0.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - sphinxcontrib-spelling==7.7.0
      - sqlalchemy==1.4.54
      - terminado==0.12.1
      - testpath==0.6.0
      - tomli==1.2.3
      - tornado==6.1
      - traitlets==4.3.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - wcwidth==0.2.13
      - webencodings==0.5.1
      - websocket-client==1.3.1
      - widgetsnbextension==3.6.10
      - zipp==3.6.0
prefix: /opt/conda/envs/nbgrader

nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_single_file_bad_assignment_name
nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_help nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_no_args nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_conflicting_args nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_multiple_args nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_no_assignment nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_single_file nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_multiple_files nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_dependent_files nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_save_cells nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_force nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_permissions nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_custom_permissions nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_add_remove_extra_notebooks nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_add_extra_notebooks_with_submissions nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_remove_extra_notebooks_with_submissions nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_same_notebooks_with_submissions nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_force_single_notebook nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_fail_no_notebooks nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_no_metadata nbgrader/tests/apps/test_nbgrader_assign.py::TestNbGraderAssign::test_header
nbgrader/coursedir.py nbgrader/server_extensions/formgrader/static/js/manage_assignments.js
nbgrader/coursedir.py nbgrader/server_extensions/formgrader/static/js/manage_assignments.js