In Germany, for example, there are a number of universities, who even make their students sign a sort of a contract, which states that everything they develop as a part of an assignment given in this and that course is property of the university and cannot be distributed in any form without the explicit permission of the institution.