We've discussed that it needs to exist, but what does it do?
verify that all questions have been saved, if not, show an error message saying that they need to do some questions. An easy way to do this would be to use a jquery selection of all elements that indicate having been saved, and also select all questions in general. If the length of the lists does not match, then they are not finished.
if all questions have been saved, make an ajax call to /dashboard/logout which will nuke their session.
this can be done with $.ajax({ url: /dashboard/logout/ })
redirect the user to a static public page saying something like "Nice Work, your exam has been submitted. Now you can relax!". done by modifying window.location.href
We've discussed that it needs to exist, but what does it do?