To gain extra credit for a course I lead, students can share their notes from a lecture which we intend to use as starting point to develop a better (free) learning material than just sharing slides from the lectures. To this end we explicitly asked the students to share their notes under a Creative Commons license.
At this point I have second thoughts whether this is completely OK ethically/legally. I would intuitively think that requiring students to waive some of their rights as authors would be problematic if the assignment was necessary to complete the course. Doing so for optional extra credit (which then lowers their point limit for the final exam) seems less problematic, but I am not sure this is actually a good enough distinction. Thanks for any notes/feedback.
I should also note that using student's work to build educational material is likely already allowed due to our country's laws (Czechia, EU) on intellectual property where work created to obtain academic credentials is explicitly allowed to be be "used by the academic institution for its internal needs and for educational purposes", no permission from the author required. CC licensing is still a step further, though.