It is a matter of a) inculcating strong student computing ethics and
b) each submission is time stamped, so 1st in best dressed
Have overcome problem using both, but for b) the courses i use allow resubmission of assignments so second person can submit their own work after receiving my curt feedback.