Added more error checking code

If the professor submits the solution to the same assignment again, the
new solution won't override the old solution.  This is a bug.  The
professor needs to be able to edit the solution if he/she makes a
mistake.