How to Get a Clean Copy of an Assignment Notebook

If you want to restore the original unmodified state of any of the notebooks or the other files associated with any of the assignments, you can use the “Lab Help” menu of Coursera Labs to do that.

The first thing to do is to rename the existing notebook, because this procedure will not overwrite existing files. You need to move the current version of the notebook aside or delete it. The advantage of renaming is that you can later copy any completed work as desired to the fresh copy of the notebook.

Open the notebook by clicking the “Work in Browser” button as usual. Then click “File → Rename” from the notebook menu:


Then choose a new name and click “Rename”:


Then click the “Lab Help” button in the upper right corner of the renamed notebook:


Then click the “Get Latest Version” button on the resulting menu:


Confirm by clicking “Update Lab”:


Once that completes, you will be running the new clean copy of the notebook.

If you then want to copy any work from the old copy, the method is to open both copies in parallel. One way to do that is to click “File → Open” and open the saved copy. Go back to the “Programming Assignment” page and open another copy of the clean notebook by clicking “Work in Browser” again. At that point, you have the two versions running in separate browser tabs and you can copy/paste in either direction. An important thing to remember is that the grader will only grade the notebook that has the standard name (the one opened by “Work in Browser”), even if you click “Submit Assignment” from a different copy. If you decide to copy from clean to old, you need to rename things so that the final version ends up with the correct name.

If Your Notebook has been Deleted

In that case, clicking the “Open Lab” button will generate a 404 Error, but the “Lab Help” button is still available:


Just click the “Lab Help” button and follow the same steps shown above. Of course there is no need to do the “rename” step, since the notebook is already gone.

Can I refresh other files besides the Notebook?

You can also use this “Get Latest Version” procedure to replace any of the other files associated with the exercise. For example, if you edit one of the utility python files or test case files and want to get back the original, just delete or rename the file in question and then do the above “Get Latest Version” procedure. In that case, you can just leave the main notebook as is and it will not be replaced. Only missing files will be replaced by this procedure.

Important Note

If you are using this procedure to make sure you have the most up-to-date version of one of the assignments, it is important to delete or rename all the utility python files like public_tests.py that you see when you click “File → Open” from the notebook. The simplest method is just to select and delete all the files with “.py” extensions, unless you have made changes in those files that you want to save. Then rename the notebook and then click “Lab Help → Get Latest Version” as described above. The key point is that this procedure will only replace missing files, so you will not get the potentially updated version of the file unless you delete or rename it first.

22 Likes

Even after following all above steps, still the “Submit Assignment” is not visible in my jupyter notebook…
What should I do for it?

1 Like

Are you sure you also went through the suggestions for “No Submit Button” on the FAQ Thread. It is also worth trying logging out of Coursera and back in again.

1 Like

Yes, I followed all steps but still it’s not working.

1 Like