"This is not the case for homework or class projects. If a professor or another student takes your code and uses it somewhere without your permission, it would be copyright infringement."
This is true. Most of the clauses are really there for something like if you produce a really astounding work of literature as part of a writing class, or a breakthrough research paper. The University might claim the right to republish that work in another form. They will always credit you for it though. If you are a graduate student, it is very likely that this will happen, and more likely that you will receive partial credit on the final paper -- your adviser will likely claim the authorship with you as an assistant. In these cases though, it is the University that owns the work, not a professor or a student. If a professor or a student took it, and it was not on behalf of the University, then it is definitely infringement.
As far as the contract goes, at my school the Calendar was the legally binding agreement. Whatever it said in the calendar was implicitly agreed to by the student when you signed up and paid for classes. It was explicitly agreed to by the institution when they published it. There may have been somewhere that I signed at some point as well that bound me to agree to the terms of the school calendar, I don't really remember.
In any case, you do not actually have to sign a contract for it to be valid. As far as legally binding goes, all you need is an offer from one party, and an acceptance of that offer from the other.
Party A provides something when Party B provides something else. In this case, services for money. Once both parties have agreed to the terms, it is a contract. It can be written by a lawyer, or by a student, on paper, or on a napkin. In many legal systems, verbal contracts are considered valid if there is a witness. A signature is not required in order to be bound by a contract -- only the exchange of goods for services. I believe a signature may be required if one party provides services and the other promises to reimburse them in the future.
This may be different at your University, or in your state or Country, which is why I suggested in the post title that the OP check the policies of their institution.
In my case, when the University extended me an offer of acceptance to the institution, and I accepted that offer by signing up for classes, then I was bound by the terms laid out in the calendar.
You can read more about contract law here: http://smallbusiness.findlaw.com/business-forms-contracts/business-forms-contracts-overview/business-forms-contracts-overview-simple.html