Without speaking to the ethics of the situation in either direction, I will say as a student that the vast majority of my time spent programming is on open source, or random personal projects. Assignments are maybe 10% of the time maximum. At least among my circle of friends (a fairly enthusiastic crowd, not a perfect representation of the major) this seems to be typical.