Plagiarism is a disruptive force in university education around the world. Many universities study mainly in academic papers and graduation thesis, this article focuses on anti-plagiarism for electronic course assignments. Our major contribution is that assignments may be divided into three classes by using different techniques to detect plagiarism: in the computer laboratory, digital watermarking algorithm with high hiding capacity was designed; in the Internet environment, we combined the vector space method and edit distance method to detect copying; for programming assignments, the BP neural network algorithm was used. A comparative experiment based on manual check shows that the accuracy rate reaches 96%. The system has been used in our teaching practice for two years, it could effectively detect plagiarism.