Sure, but if it's against school policy, the school has the right to expel you. Coursera is not taking the public code down, the owner is, at the coercion of the school. The student is making a value decision: continue the course or take my code down. If you can't play by the rules, you can't be in the game.
I think there's a unique opportunity for GitHub here. They could give an educational license to verified students in college/high-school/on-line schools. For the duration of their class, they can have as many private repos as they like. When the semester ends, you've got a week to grab your code before it goes public, like a free account. First, it would get students used to GitHub and they would clammer for it in the workplace because they love it so much; Second, it would position GH as a great supporter of education.
When the semester ends, you've got a week to grab your code before it goes public, like a free account.
I suspect this would catch on better if the repos were destroyed or stayed private. Professors reuse assignments year after year and wouldn't be too happy about public solutions to all their past assignments.
At least in my university solutions to all past problems are posted anyway, we even have our own wiki for it. I imagine it's similar in other universities.
(fwiw, I use Github exactly in this way, only with public repos)
I think there's a unique opportunity for GitHub here. They could give an educational license to verified students in college/high-school/on-line schools. For the duration of their class, they can have as many private repos as they like. When the semester ends, you've got a week to grab your code before it goes public, like a free account. First, it would get students used to GitHub and they would clammer for it in the workplace because they love it so much; Second, it would position GH as a great supporter of education.