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

Cell type changes break the grading flow #162

Open
trevorcampbell opened this issue Sep 20, 2022 · 2 comments
Open

Cell type changes break the grading flow #162

trevorcampbell opened this issue Sep 20, 2022 · 2 comments

Comments

@trevorcampbell
Copy link
Contributor

trevorcampbell commented Sep 20, 2022

Students often accidentally change the type of read-only cells (e.g. from markdown to raw). This causes nbgrader to break.

@trevorcampbell
Copy link
Contributor Author

A good solution to this would be to check for any read-only cells in the source/release notebook, and overwrite the student's copy with the instructors copy

@trevorcampbell
Copy link
Contributor Author

Just realized there's an even easier solution -- here's an example of a failed case:

{"cell_type": "raw", 
"metadata": {"deletable": false, 
                     "editable": false, 
                     "nbgrader": {"cell_type": "markdown",
                                         "checksum": "7b875f4e42e8f36bbf2ff82e266ac1b1", 
                                          "grade": false, 
                                         "grade_id": "cell-e7cd941c74d291b3", 
                                         "locked": true, 
                                         "schema_version": 3, 
                                         "solution": false}
                       }, 
"source": ["blah"]}

Basically I think in the cleaning step we can just check whether nb["cell_type"] == nb["metadata"]["nbgrader"]["cell_type"] and if not, replace the main cell_type with the nbgrader cell_type

I will fix that in prefect-by-assignment but will leave this open for rudaux-1.0-dev

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

No branches or pull requests

1 participant