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
Discovered when using notebook: 6.4.11 and nbgrader: 0.7.1 under linux
Tested & confirmed using notebook: 6.4.12 and nbgrader: 0.8.1 under linux
Expected behavior
When collecting notebooks known to be submitted, the # Submissions column should give a value, and a link to be able to grade submissions
Actual behavior
When collecting notebooks known to be submitted, the # Submissions column remains 0
Cause of the behavior
There are a number of places that use regexp to disassemble a path to find details of course-code, assignment-code, student-code, and/or notebooks.
There is a problem if any of those elements have characters in them that can be interpreted as a "regex special character" [. $ * + ? {} \ [] | () ... and various combinations involving the above.]
For example, if an assignment is called 123 (abc) - it will happily flow through the system, however formgrader will always count 0 students as NbGrader.api.get_submitted_students() has a regexp <snip>/submitted/(?P<student_id>.*)/123 (abc) ... and this matches 123 abc, with the abc in a MatchObject, *not123 (abc)
Tested solution
Increase the number of characters tested for validation in assignment_id
Edit server_extensions/formgrader/static/js/manage_assignments.js in the var createAssignment section (used in the formgrader UI)
Edit coursedir.py in def _validate_assignment_id(.. (needed for the CLI commands)
I suggest the following characters will confuse the regexp system, and should be excluded: +()/\\[]{}$^
The text was updated successfully, but these errors were encountered:
After coming across people who use braces and slashes in course codes.... I've changed a tack on this: convert relevant low ASCII characters into high-order equivalent Unicode characters.
This actually drops the clause that assignments can't have +.... we transform it to ➕ (Heavy Plus Sign U+2795)
so, in theory, abc (12/34*) + {not|really?}[^e$] becomes abc (12∕34★) ➕ {not❘really❔}[^e$] :)
Discovered when using
notebook: 6.4.11
andnbgrader: 0.7.1
under linuxTested & confirmed using
notebook: 6.4.12
andnbgrader: 0.8.1
under linuxExpected behavior
When collecting notebooks known to be submitted, the
# Submissions
column should give a value, and a link to be able to grade submissionsActual behavior
When collecting notebooks known to be submitted, the
# Submissions
column remains 0Cause of the behavior
There are a number of places that use
regexp
to disassemble a path to find details of course-code, assignment-code, student-code, and/or notebooks.There is a problem if any of those elements have characters in them that can be interpreted as a "regex special character" [. $ * + ? {} \ [] | () ... and various combinations involving the above.]
For example, if an assignment is called
123 (abc)
- it will happily flow through the system, however formgrader will always count0
students as NbGrader.api.get_submitted_students() has a regexp<snip>/submitted/(?P<student_id>.*)/123 (abc)
... and this matches123 abc
, with theabc
in a MatchObject, *not123 (abc)
Tested solution
Increase the number of characters tested for validation in
assignment_id
server_extensions/formgrader/static/js/manage_assignments.js
in thevar createAssignment
section (used in the formgrader UI)coursedir.py
indef _validate_assignment_id(..
(needed for the CLI commands)I suggest the following characters will confuse the regexp system, and should be excluded:
+()/\\[]{}$^
The text was updated successfully, but these errors were encountered: