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

Add missing grade_cells before autograding #1770

Merged
merged 1 commit into from Aug 21, 2023

Conversation

tuncbkose
Copy link
Contributor

@tuncbkose tuncbkose commented Mar 29, 2023

Add a new flag OverwriteCells.add_missing_cells, that, when set to True, compares the submitted notebook to the database before autograding and adds missing grade cells to (approximately) correct locations.

Fixes #1682 (with the provided flag).

Notes

  • Missing grade cells are added immediately after the previous grade/solution cell, because presumably the notebook structure is repeated blocks of
question students should answer (solution cell)
test for the above (grade cell)
test for the above (grade cell)
...
  • The above doesn't apply to manually graded answers, and currently I can't think of a good way to find their correct location based on the database
  • Missing cells could be added based on the notebook in the released/ directory, but there is no guarantee they are the same. Instructors can overwrite it, in which case the original notebook might not be recoverable. I am not sure if the database is completely safe, but it should be safer.

To-dos

If this looks good, I will also

  • add tests
  • extend to restoring task cells as well ("Needs Manual Grade" behaves the same as #1682 if task cells are missing).
  • Make the notification configurable?

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch AaltoSciComp/nbgrader/missing_cells

@brichet
Copy link
Contributor

brichet commented Jun 13, 2023

Thanks @tuncbkose.

Fixes #1682 (with the provided flag).

On my side the cell is indeed added, but the status is still need manual grading. I tried deleting an autograded cell.
Is that expected or have I missed something ?

@tuncbkose
Copy link
Contributor Author

... but the status is still need manual grading.

On a quick attempt, I couldn't reproduce this. I will investigate, but it would be great if you can let me know what you did step by step.

@tuncbkose
Copy link
Contributor Author

On a more involved attempt, still couldn't reproduce this status mismatch.

@brichet
Copy link
Contributor

brichet commented Aug 18, 2023

On a more involved attempt, still couldn't reproduce this status mismatch.

My fault, it was actually needed a manual grading.
Sorry for the confusion and extra attempts @tuncbkose.

Can you try rebasing on main ?

@tuncbkose
Copy link
Contributor Author

rebased

@tuncbkose
Copy link
Contributor Author

This pr shouldn't change anything for ui tests, so failure is unrelated?

@brichet
Copy link
Contributor

brichet commented Aug 21, 2023

Thanks @tuncbkose

@brichet brichet merged commit af47e5e into jupyter:main Aug 21, 2023
23 checks passed
@brichet
Copy link
Contributor

brichet commented Aug 21, 2023

@meeseeksdev backport to 0.8.x

meeseeksmachine pushed a commit to meeseeksmachine/nbgrader that referenced this pull request Aug 21, 2023
@tuncbkose tuncbkose deleted the missing_cells branch August 21, 2023 11:51
brichet pushed a commit that referenced this pull request Aug 21, 2023
Co-authored-by: tuncbkose <48298909+tuncbkose@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Students deleting grade cells causes formgrader to report "needs manual grading" forever
2 participants