You're thinking about it the wrong way. They are stuck in that classroom with YOU. The person who ultimately decides whether or not they need to take that particular class again. (Unless it's an elective, but chances are, if that's the case, you're more likely to get students who are genuinely interested in the subject matter. One of the reasons I enjoyed my AP Comp Sci classes so much.)
Edit: Presuming you're talking about being a high school or higher educator.