While I think failing the student is a little extreme, but the teacher might have had a different take on it. Some schools have intellectual property rights on what you create during/for class. Now, I admit, any school that fights over a bubble sort or something of similar ease has issues greater than a little lawsuit. But some college classes run as if this were a "Workplace" where your "assignment" is something akin to what you might run into IRL. So, immediately after the due date for the assignment the programmer goes posting the code on the net would probably be fired or otherwise supremely reprimanded if this was an actual business.
In short, while it wasn't expressly forbidden, it also wasn't expressly allowed. While the teacher shouldn't have gone to such an extreme step as failing immediately (maybe say that the student will get a 0 or something for that grade), the student should be aware of why the teacher is requesting such an act.
Then again... it could all be blown out of proportion and people should just laugh and move on.
While I think failing the student is a little extreme, but the teacher might have had a different take on it. Some schools have intellectual property rights on what you create during/for class. Now, I admit, any school that fights over a bubble sort or something of similar ease has issues greater than a little lawsuit. But some college classes run as if this were a "Workplace" where your "assignment" is something akin to what you might run into IRL. So, immediately after the due date for the assignment the programmer goes posting the code on the net would probably be fired or otherwise supremely reprimanded if this was an actual business. In short, while it wasn't expressly forbidden, it also wasn't expressly allowed. While the teacher shouldn't have gone to such an extreme step as failing immediately (maybe say that the student will get a 0 or something for that grade), the student should be aware of why the teacher is requesting such an act. Then again... it could all be blown out of proportion and people should just laugh and move on.