nbgrader icon indicating copy to clipboard operation
nbgrader copied to clipboard

Released assignments are still there after nbgrader db assignment remove

Open maryamdev opened this issue 7 years ago • 3 comments
trafficstars

OS: Ubuntu 16.04.4 LTS nbgrader version 0.5.4 jupyterhub version 0.9.0 jupyter notebook version 5.5.0

Expected behavior: When I use the command nbgrader db assignment remove <assignment_name>, it must remove all the relevant files and mentions.

Actual behavior: When I use the command nbgrader db assignment remove <assignment_name>, and then go the "Assignments" tab, the assignments are still there under "Released assignments" and I can "Fetch" them. I have deleted the files in the "source" and "released" folders as well as the user downloaded files. I see now they are under /srv/nbgrader/exchange/<course_dir>/outbound/, but I do not see the value of keeping those after removing the assignment. Actually, this can be confusing for new students.

Thanks!

maryamdev avatar Jul 14 '18 14:07 maryamdev

nbgrader db assignment remove does not un-release assignments, it only removes the assignment from the database. This could be clarified in the documentation, however. Additionally, it might be a good idea to add to the documentation all the steps that might need to be taken to completely remove an assignment, which are to:

  1. Unrelease it (nbgrader list --remove <assignment_name>)
  2. Remove it from the database (nbgrader db assignment remove <assignment_name>)
  3. Delete the release directory (rm -r release/<assignment_name>)
  4. Delete the source directory (rm -r source/<assignment_name>)
  5. Delete any submissions of it (rm -r submitted/*/<assignment_name>)
  6. Delete any autograded versions of it (rm -r autograded/*/<assignment_name>)
  7. Delete any feedback of it (rm -r feedback/*/<assignment_name>)

This is conceivably something we could also have a separate command for.

jhamrick avatar Oct 06 '18 13:10 jhamrick

I just ran into this issue. Nothing in the documentation mentions how to delete assignments, and I thought that keeping the source directory is OK (I purged all the others). Apparently not.

I would certainly welcome an nbgrader remove_assignment or something like that in 0.6.x or 0.7.0. But even until then, it would be great to dedicate a section in the documentation to assignment removal.

DavidNemeskey avatar Sep 23 '19 06:09 DavidNemeskey

The idea being that remove-assignment (and I presume a matching feedback) would both un-release and then delete from the database?

nbgrade does not (and in my view, should not) make any changes to the student's home directory, so if the idea was part of a delete so I can re-release we run into the problem of a fetch process then trying to fetch into an existing directory - which is tested for in the code, and won't complete.

...... but deleting the records from the database should be fine. Caveat: it would need to be coded to assume the assignment had done the full release/fetch/submit/collect/grade/feedback cycle, so there are no dangling elements in tbe database.

On Mon, 23 Sep 2019, 7:16 am David Mark Nemeskey, [email protected] wrote:

I just ran into this issue. Nothing in the documentation mentions how to delete assignments, and I thought that keeping the source directory is OK (I purged all the others). Apparently not.

I would certainly welcome an nbgrader remove_assignment or something like that in 0.6.x or 0.7.0. But even until then, it would be great to dedicate a section in the documentation to assignment removal.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jupyter/nbgrader/issues/995?email_source=notifications&email_token=AALJCDH5HLPSJGY26DDN4NLQLBNLBA5CNFSM4FJ7PQQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7J4E6I#issuecomment-533971577, or mute the thread https://github.com/notifications/unsubscribe-auth/AALJCDADO4XCX6H3TXKKJTTQLBNLBANCNFSM4FJ7PQQQ .

perllaghu avatar Sep 23 '19 06:09 perllaghu