On similar lines I had a course on software architecture [0] during my Master's in which students had to choose a sufficiently complex open source project and analyze it from an architectural perspective, summarizing their findings in the form of chapters to be compiled in a book [1] inspired by [2]. We were also highly encouraged to raise PRs though it wasn't compulsory. Most student groups did end up raising PRs and getting them merged, albeit most were understandably minor ones given the short timeline (~2.5 months for the entire course).
Personally I can say it was a really good experience and it certainly made me look at open source development (and programming in general) from a more nuanced perspective - and I suppose it would definitely be a good idea to introduce such courses when students are sufficiently prepared for them, in the more advanced stages of their study programmes.
[0] - "IN4315 Software Architecture" (https://se.ewi.tudelft.nl/delftswa/) [1] - "DESOSA 2019" (https://se.ewi.tudelft.nl/desosa2019/) [2] - "AOSA" (http://aosabook.org/en/index.html)