This should be done in the controller so a student cannot log a submission for another student.