Moodle has a tool that detects plagiarism in assignments and allows to check if assignment submissions are plagiarised from external sources or among students. It is highly recommended to activate it when setting up the assignment (it cannot be activated once the student has submitted the assignment). The anti-plagiarism system only works with text documents (pdf, Word...).