MDL-41575 assign: Prevent fatal error with lock/unlock

This occurs when there is no submission record for a student.
This requires an API change to avoid having to create a submission record
for the student when they have not submitted anything.