This is a really great suggestion! But there are some challenges.
I teach a course called Research Computing for Earth Science. Most of our ~30 students are Python novices on day 1. Even by the end of the course, few of them would have the skills needed to solve a real issue in a real open source project. People reach this level after a few years of using python in their day-to-day research. I worry that using PRs as an educational device could lead to frustration on both sides. Having a lot of PRs from inexperienced people could actually create a lot more work for the project maintainers. Students also seem to like clearly defined metrics for evaluation. As an instructor, I don’t really control the outcome of a PR on a community project.
I think your idea would be more feasible for a more advanced group. We don’t currently have a class like that in our department, but we may try to spin one up in the future.